Search code examples
elasticsearchelastic-stack

Cannot upgrade node because incompatible indices created with version [6.2.3] exist


I recently started using 8.5.3 version of Elasticsearch.I have some indices that were created in two earlier versions i.e. 7.17.0 and 6.2.3 Now when i while starting Elasticsearch for the version 8.5.3 i am getting the following error-

[2023-06-29T02:29:56,936][ERROR][o.e.b.Elasticsearch      ] [DESKTOP-PFQE75S] fatal exception while booting Elasticsearchjava.lang.IllegalStateException: cannot upgrade node because incompatible indices created with version [6.2.3] exist, while the minimum compatible index version is [7.0.0]. Upgrade your older indices by reindexing them in version [7.17.0] first.
        at org.elasticsearch.server@8.5.3/org.elasticsearch.env.NodeEnvironment.checkForIndexCompatibility(NodeEnvironment.java:529)
        at org.elasticsearch.server@8.5.3/org.elasticsearch.env.NodeEnvironment.upgradeLegacyNodeFolders(NodeEnvironment.java:408)
        at org.elasticsearch.server@8.5.3/org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:301)
        at org.elasticsearch.server@8.5.3/org.elasticsearch.node.Node.<init>(Node.java:474)
        at org.elasticsearch.server@8.5.3/org.elasticsearch.node.Node.<init>(Node.java:318)

Can anyone please help me to resolve this? Can we temporarily bypass this particular check? If not what do i need to do?Do i need to reindex these 6.x version indices?If yes can you please share some relevant link mentioning steps for the same?


Solution

  • The upgrade procedure is pretty clear, you cannot upgrade to 8.x with 6.x indexes, you first need to upgrade to 7.17 so that the indexes created in 6.2.3 can be upgraded and then only you can upgrade to 8.5.3.

    Upgrade from 7.x To upgrade to 8.5.3 from 7.16 or an earlier version, you must first upgrade to 7.17*, even if you opt to do a full-cluster restart instead of a rolling upgrade. This enables you to use the Upgrade Assistant to identify and resolve issues, reindex indices created before 7.0, and then perform a rolling upgrade.