|
| 1 | +[[resolve-migrations-failures]] |
| 2 | +=== Resolve migration failures |
| 3 | + |
| 4 | +Migrating {kib} primarily involves migrating saved object documents to be compatible |
| 5 | +with the new version. |
| 6 | + |
| 7 | +[float] |
| 8 | +==== Resolve saved object migration failures |
| 9 | + |
| 10 | +If {kib} unexpectedly terminates while migrating a saved object index, {kib} automatically attempts to |
| 11 | +perform the migration again when the process restarts. Do not delete any saved objects indices to |
| 12 | +to fix a failed migration. Unlike previous versions, {kib} 7.12.0 and |
| 13 | +later does not require deleting indices to release a failed migration lock. |
| 14 | + |
| 15 | +If upgrade migrations fail repeatedly, refer to |
| 16 | +<<preventing-migration-failures, preparing for migration>>. |
| 17 | +When you address the root cause for the migration failure, |
| 18 | +{kib} automatically retries the migration. |
| 19 | +If you're unable to resolve a failed migration, contact Support. |
| 20 | + |
| 21 | + |
| 22 | +[float] |
| 23 | +[[upgrade-migrations-old-indices]] |
| 24 | +==== Handle old `.kibana_N` indices |
| 25 | + |
| 26 | +After the migrations complete, multiple {kib} indices are created in {es}: (`.kibana_1`, `.kibana_2`, `.kibana_7.12.0` etc). |
| 27 | +{kib} only uses the index that the `.kibana` and `.kibana_task_manager` aliases point to. |
| 28 | +The other {kib} indices can be safely deleted, but are left around as a matter of historical record, and to facilitate rolling {kib} back to a previous version. |
| 29 | + |
| 30 | +[float] |
| 31 | +==== Handle known issues with {fleet} beta |
| 32 | +If you see a`timeout_exception` or `receive_timeout_transport_exception` error, |
| 33 | +it might be from a known known issue in 7.12.0 if you tried the {fleet} beta. |
| 34 | +Upgrade migrations fail because of a large number of documents in the `.kibana` index, |
| 35 | +which causes {kib} to log errors such as: |
| 36 | + |
| 37 | +[source,sh] |
| 38 | +-------------------------------------------- |
| 39 | +Error: Unable to complete saved object migrations for the [.kibana] index. Please check the health of your Elasticsearch cluster and try again. Error: [receive_timeout_transport_exception]: [instance-0000000002][10.32.1.112:19541][cluster:monitor/task/get] request_id [2648] timed out after [59940ms] |
| 40 | +
|
| 41 | +Error: Unable to complete saved object migrations for the [.kibana] index. Please check the health of your Elasticsearch cluster and try again. Error: [timeout_exception]: Timed out waiting for completion of [org.elasticsearch.index.reindex.BulkByScrollTask@6a74c54] |
| 42 | +-------------------------------------------- |
| 43 | + |
| 44 | +For instructions on how to mitigate the known issue, refer to https://github.com/elastic/kibana/issues/95321[the GitHub issue]. |
| 45 | + |
| 46 | + |
| 47 | +[float] |
| 48 | +==== Handle corrupt saved objects |
| 49 | +To find and remedy problems caused by corrupt documents, we highly recommend testing your {kib} upgrade in a development cluster, |
| 50 | +especially when there are custom integrations that create saved objects in your environment. |
| 51 | + |
| 52 | +Saved objects that are corrupted through manual editing or integrations cause migration |
| 53 | +failures with a log message, such as `Unable to migrate the corrupt Saved Object document ...`. |
| 54 | +For a successful upgrade migration, you must fix or delete corrupt documents. |
| 55 | + |
| 56 | +For example, you receive the following error message: |
| 57 | + |
| 58 | +[source,sh] |
| 59 | +-------------------------------------------- |
| 60 | +Unable to migrate the corrupt saved object document with _id: 'marketing_space:dashboard:e3c5fc71-ac71-4805-bcab-2bcc9cc93275'. To allow migrations to proceed, please delete this document from the [.kibana_7.12.0_001] index. |
| 61 | +-------------------------------------------- |
| 62 | + |
| 63 | +To delete the documents that cause migrations to fail, take the following steps: |
| 64 | + |
| 65 | +. Remove the write block which the migration system has placed on the previous index: |
| 66 | ++ |
| 67 | +[source,sh] |
| 68 | +-------------------------------------------- |
| 69 | +PUT .kibana_7.12.1_001/_settings |
| 70 | +{ |
| 71 | + "index": { |
| 72 | + "blocks.write": false |
| 73 | + } |
| 74 | +} |
| 75 | +-------------------------------------------- |
| 76 | + |
| 77 | +. Delete the corrupt document: |
| 78 | ++ |
| 79 | +[source,sh] |
| 80 | +-------------------------------------------- |
| 81 | +DELETE .kibana_7.12.0_001/_doc/marketing_space:dashboard:e3c5fc71-ac71-4805-bcab-2bcc9cc93275 |
| 82 | +-------------------------------------------- |
| 83 | + |
| 84 | +. Restart {kib}. |
| 85 | ++ |
| 86 | +The dashboard with the `e3c5fc71-ac71-4805-bcab-2bcc9cc93275` ID that belongs to the `marketing_space` space **is no longer available**. |
| 87 | + |
| 88 | +[float] |
| 89 | +[[unknown-saved-object-types]] |
| 90 | +==== Handle documents for unknown saved objects |
| 91 | +Migrations will fail if saved objects belong to an unknown |
| 92 | +saved object type. Unknown saved objects are typically caused by |
| 93 | +to the {es} index, or by disabling a plugin that had previously |
| 94 | +created a saved object. |
| 95 | + |
| 96 | +We recommend using the {kibana-ref-all}/7.17/upgrade-assistant.html[Upgrade Assistant] |
| 97 | +to discover and remedy any unknown saved object types. {kib} version 7.17.0 deployments containing unknown saved |
| 98 | +object types will also log the following warning message: |
| 99 | + |
| 100 | +[source,sh] |
| 101 | +-------------------------------------------- |
| 102 | +CHECK_UNKNOWN_DOCUMENTS Upgrades will fail for 8.0+ because documents were found for unknown saved object types. To ensure that upgrades will succeed in the future, either re-enable plugins or delete these documents from the ".kibana_7.17.0_001" index after the current upgrade completes. |
| 103 | +-------------------------------------------- |
| 104 | + |
| 105 | +If you fail to remedy this, your upgrade to 8.0+ will fail with a message like: |
| 106 | + |
| 107 | +[source,sh] |
| 108 | +-------------------------------------------- |
| 109 | +Unable to complete saved object migrations for the [.kibana] index: Migration failed because documents were found for unknown saved object types. To proceed with the migration, please delete these documents from the ".kibana_7.17.0_001" index. |
| 110 | +-------------------------------------------- |
| 111 | + |
| 112 | +[float] |
| 113 | +==== Handle incompatible settings or mappings |
| 114 | +Matching index templates that specify `settings.refresh_interval` or |
| 115 | +`mappings` are known to interfere with {kib} upgrades. |
| 116 | +This can happen when index templates are defined manually. |
| 117 | + |
| 118 | +To make sure the index templates won't apply to new `.kibana*` indices, narrow down the {data-sources} of any user-defined index templates. |
| 119 | + |
| 120 | +[float] |
| 121 | +==== Handle incompatible `xpack.tasks.index` configuration setting |
| 122 | +In {kib} 7.5.0 and earlier, when the task manager index is set to `.tasks` |
| 123 | +with the configuration setting `xpack.tasks.index: ".tasks"`, |
| 124 | +upgrade migrations fail. In {kib} 7.5.1 and later, the incompatible configuration |
| 125 | +setting prevents upgrade migrations from starting. |
0 commit comments