Getting exception while starting the elastic search node

We are getting below exception while starting one of the elastic search nodes.
[2020-04-20T15:22:16,743][ERROR][o.e.g.GatewayMetaState ] [elk-denmod-web-2] failed to read local state, exiting... **java.lang.IllegalStateException: index and alias names need to be unique, but alias [denmod_y_3698] and index [denmod_y_3698/g8fYmCo_QYaJKCdcdXONOQ] have the same name** at org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1034) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:73) ~[elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:88) [elasticsearch-5.3.1.jar:5.3.1] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_131] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_131] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_131] at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:49) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:191) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:183) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:818) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:183) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:173) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:161) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:96) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:43) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.node.Node.<init>(Node.java:489) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.node.Node.<init>(Node.java:242) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:242) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:58) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.3.1.jar:5.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.3.1.jar:5.3.1]
is there any way to start that elastic search node without losing any data?

please help me to resolve this issue

Your error message says you have an index alias with the same name as in index in your cluster. I didn't know that this was possible or how you managed to do it, but it's obviously illegal.

You could try to delete the alias from a running node in the same cluster, either in Kibana or with a curl command like this:

curl -XDELETE "http://localhost:9200/denmod_y_3698/_alias/denmod_y_3698?pretty"

If that doesn't work you may have to delete the index. But I would try to delete the alias first.

The data node is different. The node which am trying to start is just master and ingest node. In error the index name is mentioned as[denmod_y_3698/g8fYmCo_QYaJKCdcdXONOQ] and i could see the folder with name g8fYmCo_QYaJKCdcdXONOQ in the path elasticsearch-5.3.1\data\nodes\0\indices. is this causing the issue? if i delete that folder,can i start the node successfully?

Please provide an update on this.

Does it mean that you changed the role of the node? It was a data node and you restarted it as an ingest node?

Removing the data dir would probably work if an only if the node is not a data node. You are otherwise at risk of loosing some data.

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