Issue
-
In a CCR scenario where the leader cluster is down and the system continues operating by reading and writing to the follower after disabling CCR, an HTTP/1.1 500 Internal Server Error occurs when attempting to re-enable CCR after communication with the leader cluster is restored.
-
[HTTP/1.1 500 Internal Server Error]
{"error":{"root_cause":[{"type":"snapshot_restore_exception","reason":"[_ccr_xxx:_latest_/_latest_] cannot restore index [liferay-303371-workflow-metrics-transitions] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"}],"type":"snapshot_restore_exception","reason":"[_ccr_xxx:_latest_/_latest_] cannot restore index [liferay-303371-workflow-metrics-transitions] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"},"status":500}
Environment
- Liferay DXP for Elasticsearch versions 7 and above.
- A LES license is necessary to enable CCR feature.
Resolution
- Once the communication of the 'Leader' cluster is restored, we delete the cluster index using the following command:
-
curl -X DELETE "http://${nodo_leader}:9200/_all"
Additional Information