When upgrading from 7.17.19 to v8, I get exception "only supported from version [7.17.0]"

I have a 3 node environment that's on 7.17.19 and it's upgrading to 8.14.1 but two of the nodes are getting the error:

Format version is not supported. Upgrading to [8.14.1] is only supported from version [7.17.0]. See [1] for full stack. I wouldn't expect any error because Upgrade Elasticsearch | Elasticsearch Guide [8.15] | Elastic says that it should work when the server had already been upgraded to 7.17.

Before the upgrade, curling / shows that the server version.number is 7.17.19 and the minimum_{wire,index}_compatibility_versions are v6.8.0 and 6.0.0-beta1, respectively (see [2]), on all nodes, which should be fine. Curling index settings using curl -s localhost:9200/<indexname>/_settings?pretty | grep "created" shows 7171599 and 7060299 for all of them.

Questions:

  1. Should a 7.17.19 elasticsearch server that has indexes with 7060299 as the 'created' value be ok before upgrading to v8? We have lots of customers that would've run into this problem if this were the case. Related question, when the doc says we need to upgrade to 7.17 does that mean the server (so the server's state/metadata must reflect 7.17) or does that refer to the indexes?

  2. Here's the relevant elasticsearch code: elasticsearch/server/src/main/java/org/elasticsearch/env/NodeEnvironment.java at be764924a165eccf8197705fd206f116e276574d · elastic/elasticsearch · GitHub In what circumstances do you think metadata would be null? All the nodes/0/_state and nodes/0/indices data appears to be there on disk.

Thanks

===========

[1]:

[2024-09-10T21:12:43,484][ERROR][org.elasticsearch.bootstrap.Elasticsearch] [redacted] fatal exception while booting Elasticsearch
org.elasticsearch.ElasticsearchException: Failed to bind service
        at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:281) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.node.Node.<init>(Node.java:192) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:240) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:240) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.14.1.jar:?]
Caused by: org.elasticsearch.gateway.CorruptStateException: Format version is not supported. Upgrading to [8.14.1] is only supported from version [7.17.0].
        at org.elasticsearch.env.NodeEnvironment.checkForIndexCompatibility(NodeEnvironment.java:517) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.env.NodeEnvironment.upgradeLegacyNodeFolders(NodeEnvironment.java:416) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:309) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.node.NodeConstruction.validateSettings(NodeConstruction.java:509) ~[elasticsearch-8.14.1.jar:?]
        at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:256) ~[elasticsearch-8.14.1.jar:?]
        ... 4 more

[2]:

$ curl localhost:9200
{
  "name" : "[redacted]",
  "cluster_name" : "[redacted]",
  "cluster_uuid" : "TMLn5Z1pTESQf2axLTZ7Lg",
  "version" : {
    "number" : "7.17.19",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "92f290e9537478f85ff3fe3ab39945c1a49a6c1a",
    "build_date" : "2024-03-21T14:34:38.216751500Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.3",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Hi,

Did you check the Upgrade Assistant in Kibana before upgrading? Normally, it shows any possible issues before such a thing happens.

In your case, I think there are still 6.x indices in your stack that cause the new version to fail. As documented in your linked upgrade manual:

If you have indices created in 6.x or earlier, you might use the archive functionality to import them into newer Elasticsearch versions, or you must reindex or delete them before upgrading to 8.15.1. Elasticsearch nodes will fail to start if incompatible indices are present

Best regards
Wolfram