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

illegal_argument_exception while reindexing #27533

Closed
c0da opened this issue Nov 27, 2017 · 5 comments
Closed

illegal_argument_exception while reindexing #27533

c0da opened this issue Nov 27, 2017 · 5 comments

Comments

@c0da
Copy link

c0da commented Nov 27, 2017

Hello everyone,

I'm trying to migrate from 5.6.4 to 6.0, and upgrade assistant detected some indices that need to be reindexed.

While trying to reindex, some of them are failing with the following error:

{
  "statusCode": 500,
  "error": "Internal Server Error",
  "message": "An internal server error occurred",
  "code": "ERR_CREATE_INDEX_FAILED",
  "root_cause": [
    {
      "type": "illegal_argument_exception",
      "reason": "unknown setting [index.archived.index.routing.allocation.disable_allocation] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
    }
  ],
  "type": "illegal_argument_exception",
  "reason": "unknown setting [index.archived.index.routing.allocation.disable_allocation] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
  "reindexedIndexName": "exchange-2016.05.26-reindexed-v5"
}

Does anybody know to fix this?

Thanks in advance!

@albertzaharovits
Copy link
Contributor

albertzaharovits commented Nov 27, 2017

Hello @c0da

The index you are trying to migrate to v6 has been migrated in the past from v2 to v5.
Unfortunately you have hit a double corner case:

  1. the automatic migrate tool does not handle it (and causes the error you reported)
  2. a bug preventing the removal of the archived index settings namespace Unable to delete archived index settings #27537

The workaround is to recreate the indices and reindex manually:

  1. identify indices requiring upgrade with: GET /_xpack/migration/assistance
  2. get index settings and remove the archived namespace and any settings that have been changed breakingly
  3. create the new index with the new settings
  4. use the the reindex API

@c0da
Copy link
Author

c0da commented Nov 29, 2017

Thank you @albertzaharovits ! I'll give it a try and let you know.

@c0da
Copy link
Author

c0da commented Jan 24, 2018

Thank you again, @albertzaharovits ! Your workaround worked like a charm!

@c0da c0da closed this as completed Jan 24, 2018
@tomsommer
Copy link

This is not solved by #27537 though

@andrew-goldstein
Copy link

If while migrating from v2 you run into this issue, where the index.archived.index.routing.allocation.disable_allocation setting prevents migration of an index via the assistant UI, you may execute the procedure documented at https://www.elastic.co/guide/en/kibana/current/migrating-6.0-index.html
for every index that contains the index.archived.index.routing.allocation.disable_allocation setting.

Please note that the documented procedure does not migrate existing index settings. That's generally fine for the .kibana index, however if you are migrating other indexes, and you wish to preserve their settings, you must do the following (for each index being migrated):

  1. Copy the current index settings from the output of the following (example) GET request, run in the Kibana Dev Tools. If, for example, your index was named index_test, execute the following GET request:

GET /index_test/_settings

  1. In a text editor, remove the index.archived.index.routing.allocation.disable_allocation setting from the output above.

  2. Use the modified settings above (that omit index.archived.index.routing.allocation.disable_allocation) when executing the PUT described in step 2 of https://www.elastic.co/guide/en/kibana/current/migrating-6.0-index.html

To be clear, the extra steps above are only required if you have specific index settings you wish to retain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants