Incompatible index on upgrade to v3.0.0

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 3.0.0

Describe the issue:
I’m trying to upgrade to version 3.0. But getting this error:

org.opensearch.bootstrap.StartupException: java.lang.IllegalStateException: The index [[.apm-agent-configuration/4B6dvFusQZWVO66YoKQ2Vw]] was created with version [7.10.0] but the minimum compatible version is [2.0.0]. It should be re-indexed in OpenSearch 2.x before upgrading to 3.0.0.

When I try to list indices, I don’t see any such index. Even if I try to delete it ( DELETE .apm*), I’m getting same error

You’ll need to do something like this:

#!/bin/bash

INDEX=$1


curl -k --cert ./admin.pem --key ./admin-key.pem -XPOST 'https://localhost:9200/_reindex?wait_for_completion=true' -H "Content-type:application/json" -d '{"source":{"index":"'${INDEX}'"}, "dest":{"index":"'${INDEX}'-re"}}'
curl -k --cert ./admin.pem --key ./admin-key.pem -XDELETE "https://localhost:9200/${INDEX}"
curl -k --cert ./admin.pem --key ./admin-key.pem -XPOST 'https://localhost:9200/_reindex?wait_for_completion=true' -H "Content-type:application/json" -d '{"source":{"index":"'${INDEX}'-re"}, "dest":{"index":"'${INDEX}'"}}'
2 Likes

The solution was to remove the data from /usr/share/opensearch/data and start the pod again.

Reindex, even reading was impossible.

@joelp I’m just curious, did you follow the curl commands shared by @jasonrojas ?
It is important to use superadmin certificate, as most of the hidden indices (.<index_name>) are accessible by a superadmin defined in the admin_dn of opensearch.yml

1 Like