Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immense Upgrade Assistant error messages are indexed, preventing Kibana from starting #71642

Closed
cjcenizal opened this issue Jul 14, 2020 · 3 comments · Fixed by #71710
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:Upgrade Assistant regression Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@cjcenizal
Copy link
Contributor

cjcenizal commented Jul 14, 2020

In #64332 we defined the mappings used by the Upgrade Assistant saved objects explicitly instead of depending upon dynamic: true. In particular this line defines errorMessage as type keyword.

This change shipped with 7.8 and causes Kibana to stop working when upgraded to 7.8. These error messages show up in the logs:

Document contains at least one immense term in field="upgrade-assistant-reindex-operation.errorMessage" (whose UTF8 encoding is longer than the max length 32766)

I need to verify this, but based on feedback from people using earlier versions, it looks like the new type is incorrect. Previously, the type was defined like this:

{
  "type": "text",
  "fields": {
    "keyword": {
      "type": "keyword",
      "ignore_above": 256
    }
  }
}

The use of ignore_above meant that error messages longer than 256 bytes would not be indexed as keyword. Without this safeguard, I believe Upgrade Assistant generates and indexes very large error messages, which causes problems when Kibana tries to start up.

@cjcenizal cjcenizal added bug Fixes for quality problems that affect the customer experience regression Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Upgrade Assistant labels Jul 14, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@rudolf
Copy link
Contributor

rudolf commented Jul 15, 2020

@cjcenizal can you document a workaround here should anyone stumble upon this issue?

@cjcenizal
Copy link
Contributor Author

Thanks for the reminder @rudolf!

Workaround

  1. Stop the Kibana instance.
  2. Check the current alias for the .kibana index. This should point to .kibana_X index.
  3. Check the list of indices and you should see that a .kibana_X+1 exists (the one created during the upgrade and also reported in the Kibana logs). Delete this index:
  4. DELETE .kibana_X+1
  5. Backup .kibana_X index:
POST _reindex
{
  "source": {
    "index": ".kibana_X"
  },
  "dest": {
    "index": ".kibana_X_backup"
  }
}
  1. Delete all documents containing failed in the upgrade-assistant-reindex-operation.errorMessage field from .kibana_X index:
POST .kibana_X/_delete_by_query
{
  "query": {
    "match": {
      "upgrade-assistant-reindex-operation.errorMessage": "failed"
    }
  }
}
  1. Resume the instance. Kibana instance should be up and running.

@cjcenizal cjcenizal changed the title Large Upgrade Assistant error messages are indexed, preventing Kibana from starting Immense Upgrade Assistant error messages are indexed, preventing Kibana from starting Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Upgrade Assistant regression Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants