Unwanted Upgrade ElasticSearch version

I made a mistake by trying to upgrade my elasticsearch version from 6.3.2 to 7.2.0.

I launched my container with the new version but I realized that kibana does not work anymore.

So I decided to downgrade elasticsearch to 6.3.2 to get a quick fix but it still not working. I got the following error:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1
[2019-07-23T14:21:59,939][INFO ][o.e.n.Node ] initializing ...
[2019-07-23T14:22:00,105][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[java.io.IOException: failed to read [id:205, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-205.st]]; nested: IOException[failed to read [id:205, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-205.st]]; nested: IllegalArgumentException[[node_meta_data] unknown field [node_version], parser not found];
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.3.2.jar:6.3.2]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.3.2.jar:6.3.2]
Caused by: org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:205, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-205.st]
at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:199) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:331) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:357) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:245) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:270) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:252) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.2.jar:6.3.2]
... 6 more
Caused by: java.io.IOException: failed to read [id:205, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-205.st]
at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:325) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:357) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:245) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:270) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:252) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.2.jar:6.3.2]
... 6 more
Caused by: java.lang.IllegalArgumentException: [node_meta_data] unknown field [node_version], parser not found
at org.elasticsearch.common.xcontent.ObjectParser.getParser(ObjectParser.java:347) ~[elasticsearch-x-content-6.3.2.jar:6.3.2]
at org.elasticsearch.common.xcontent.ObjectParser.parse(ObjectParser.java:158) ~[elasticsearch-x-content-6.3.2.jar:6.3.2]
at org.elasticsearch.common.xcontent.ObjectParser.apply(ObjectParser.java:182) ~[elasticsearch-x-content-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeMetaData$1.fromXContent(NodeMetaData.java:110) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeMetaData$1.fromXContent(NodeMetaData.java:94) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:199) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:320) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.loadOrCreateNodeMetaData(NodeEnvironment.java:357) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:245) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:270) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.node.Node.(Node.java:252) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.2.jar:6.3.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.2.jar:6.3.2]
... 6 more

Do someone have any idea for a quick fix ?

You can't downgrade, it is forbidden from 6.8
Maybe you should return to 7.2 and fix kibana?

Ok Thanks for your advice.
I resolve the upgrade issue and that's working fine now

HOW DID YOU RESOLVE THIS?

1 Like

Well, I must have simply misspoke.

I tried to upgrade version from 6.3.2 to 7.2.0.
I did not want it and had an error with Kibana (kibana.yml I had the elasticsearch.url instead of elasticsearch.hosts).

So I tried to came back to previous version 6.3.2 but I got the error I pasted.

Denis Lamanov told me that it is forbidden to downgrade from 6.8, so I just keep the 7.2.0 version aand resolve the kibana.yml issue.

Hope I be clear this time.

Actually according to docs you can upgrade ONLY from 6.8 to 7.x
So I recomend before upgrade to 7.x make update to 6.8

To be clear, all downgrades are forbidden. Sometimes a downgrade will appear to work (possibly silently losing data) and sometimes they'll fail as reported here, but downgrading to any earlier version is unsupported. This is even true for patch releases like trying to downgrade from 7.1.1 to 7.1.0.

This is not completely true. You can upgrade directly from any 6.y version to any 7.x version (for x ≥ 1) via a full cluster restart. If you want to perform a rolling upgrade you can only do this from 6.8.y to 7.x (for x ≥ 1).

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.