Troubleshooting migration from Elasticsearch to OpenSearch
If your migration of Elasticsearch to OpenSearch is not working as you expect, see the issues that are listed and try the mitigation or workarounds.
Error accessing Elasticsearch or OpenSearch
- Problem
- Unable to access Elasticsearch or OpenSearch at the beginning of each run of the script.
- Workaround
- Take the following actions.
- Check the environment variables.
- Fix route or NetworkPolicy or run the script from the OpenSearch pod.
OpenSearch pods fail to start
- Problem
- OpenSearch pods may fail to start if the Red Hat® OpenShift® Container Platform does not have enough CPU and memory.
- Cause
- Each new OpenSearch pod requires 800m CPU, 2Gi RAM, and the Red Hat OpenShift Container Platform cluster does not have enough resources to accommodate the new OpenSearch pods.
- Workaround
- Add more resources to the Red Hat OpenShift Container Platform cluster.
Error messages displayed when you create index
- Problem
- Before the script starts the migration, you see error messages when you create the index.
- Workaround
- This indicates that the index exists. You can either ignore the error message or delete the index before you start the migration.
Copy of documents slows down dramatically
- Problem
- During the migration of indexes, the output shows a slowdown in progress.
- Cause
- This is likely a resource issue.
- Workaround
- Raise the CPU and memory that is allocated to OpenSearch.
All documents are not copied
- Problem
- After migration, the script reports the actual count of copied documents during the session.
- Cause
- It is possible that the index already contained some of the documents or the session copied a subset of documents.
- Workaround
- Verify the exact count by using the
-doc_count
parameter. Be sure that the time intervals used catch the whole range oftimestamps
.
The index is not deleted
- Problem
- After you interrupt the script and when you try to delete the index, you are unable to delete the index.
- Cause
- The reindex task in still running in the background, and keeps created again with default settings if deleted.
- Workaround
- Use the task ID displayed by the script and OpenSearch task REST APIs to cancel the task, and then delete the index.
Zero document copied
- Problem
- Zero documents are copied when you migrate an index.
- Cause
-
- No document matches the time window, if specified.
- OpenSearch index was not deleted before migrating (the documents are already copied before).
- Issue with URL or credentials - No document is copied for any index.
- Workaround
- Issue with URL or credentials - Use OpenSearch REST APIs
GET _tasks/<task-ID>
to get the exact error message. The script displays the task ID in the form0FtV2kTXRSqfFkE_1eSqFw:15699
.