Upgrade from 5.6 to 6.2.1: Failed to read local state

Hello,

I tried upgrading my Elasticsearch to 6.2.1 on Windows but everytime I start the service it fails with this exception:

failed to read local state, exiting...
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:440, legacy:false, file:D:\elasticsearch\nodes\0\_state\global-440.st]
	at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:150) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:334) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaStateService.loadGlobalState(MetaStateService.java:113) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:57) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:88) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.node.Node.<init>(Node.java:424) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.node.Node.<init>(Node.java:246) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.1.jar:6.2.1]
Caused by: java.io.IOException: failed to read [id:440, legacy:false, file:D:\elasticsearch\nodes\0\_state\global-440.st]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:327) ~[elasticsearch-6.2.1.jar:6.2.1]
	... 15 more
Caused by: java.lang.IllegalArgumentException: Index patterns must not be null or empty; got null
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData.<init>(IndexTemplateMetaData.java:97) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.build(IndexTemplateMetaData.java:383) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.fromXContent(IndexTemplateMetaData.java:518) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.MetaData$Builder.fromXContent(MetaData.java:1175) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.MetaData$2.fromXContent(MetaData.java:1222) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.MetaData$2.fromXContent(MetaData.java:1213) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:202) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:322) ~[elasticsearch-6.2.1.jar:6.2.1]
	... 15 more
[2018-02-26T18:23:37,081][ERROR][o.e.b.Bootstrap          ] Exception
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:440, legacy:false, file:D:\elasticsearch\nodes\0\_state\global-440.st]
	at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:150) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:334) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaStateService.loadGlobalState(MetaStateService.java:113) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:57) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:88) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.node.Node.<init>(Node.java:424) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.node.Node.<init>(Node.java:246) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.1.jar:6.2.1]
	at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.1.jar:6.2.1]
Caused by: java.io.IOException: failed to read [id:440, legacy:false, file:D:\elasticsearch\nodes\0\_state\global-440.st]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:327) ~[elasticsearch-6.2.1.jar:6.2.1]
	... 15 more
Caused by: java.lang.IllegalArgumentException: Index patterns must not be null or empty; got null
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData.<init>(IndexTemplateMetaData.java:97) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.build(IndexTemplateMetaData.java:383) ~[elasticsearch-6.2.1.jar:6.2.1]
	at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.fromXContent(IndexTemplateMeta
...

I made an upgrade as shown as here.

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