Elasticsearch immediately stop after start

I installed elasticsearch 5.6.8 on Redhat. I have started the elasticsearch by using systemctl start elasticsearch . After status change to running then it goes to the failure mode.
I am sending you my elasticsearch log.
Thank you.

  1. Error injecting constructor, ElasticsearchException[java.io.IOException: failed to read [id:11, legacy:false, file:/var/lib/elasticsearch/nodes/0/_state/global-11.st]]; nested: IOException[failed to read [id:11, legacy:false, file:/var/lib/elasticsearch/nodes/0/_state/global-11.st]]; nested: IllegalArgumentException[Template must not be null];
    at org.elasticsearch.gateway.GatewayMetaState.(Unknown Source)
    while locating org.elasticsearch.gateway.GatewayMetaState
    Caused by: ElasticsearchException[java.io.IOException: failed to read [id:11, legacy:false, file:/var/lib/elasticsearch/nodes/0/_state/global-11.st]]; nested: IOException[failed to read [id:11, legacy:false, file:/var/lib/elasticsearch/nodes/0/_state/global-11.st]]; nested: IllegalArgumentException[Template must not be null];
    at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:190)
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:334)
    at org.elasticsearch.gateway.MetaStateService.loadGlobalState(MetaStateService.java:113)
    at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:57)
    at org.elasticsearch.gateway.GatewayMetaState.(GatewayMetaState.java:92)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:49)
    at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
    at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116)
    at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825)
    at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
    at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
    at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:191)
    at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:183)
    at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:818)
    at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:183)
    at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:176)
    at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:161)
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:96)
    at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96)
    at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
    at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42)
    at org.elasticsearch.node.Node.(Node.java:499)
    at org.elasticsearch.node.Node.(Node.java:245)
    at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233)
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233)
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342)
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132)
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
    at org.elasticsearch.cli.Command.main(Command.java:90)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
    Caused by: java.io.IOException: failed to read [id:11, legacy:false, file:/var/lib/elasticsearch/nodes/0/_state/global-11.st]
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:327)
    ... 37 more
    Caused by: java.lang.IllegalArgumentException: Template must not be null
    at org.elasticsearch.cluster.metadata.IndexTemplateMetaData.(IndexTemplateMetaData.java:94)
    at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.build(IndexTemplateMetaData.java:374)
    at org.elasticsearch.cluster.metadata.IndexTemplateMetaData$Builder.fromXContent(IndexTemplateMetaData.java:502)
    at org.elasticsearch.cluster.metadata.MetaData$Builder.fromXContent(MetaData.java:1164)
    at org.elasticsearch.cluster.metadata.MetaData$2.fromXContent(MetaData.java:1211)
    at org.elasticsearch.cluster.metadata.MetaData$2.fromXContent(MetaData.java:1202)
    at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:202)
    at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:322)
    ... 37 more

Can you run ls -l /var/lib/elasticsearch/nodes/0/_state/ and put the output here?

Hey,

Thank you for reply.

I solved this issues by deleting elasticsearch from below path and reinstalled it.
/var/lib/elasticsearch

4 Likes

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