# Elasticsearch server stops right after start

**URL:** https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571
**Category:** Elasticsearch
**Created:** [September 6, 2017, 11:39am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571 "2017-09-06T11:39:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tkvmai](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@tkvmai](https://discuss.elastic.co/u/tkvmai)
#### Post date: [September 6, 2017, 11:39am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/1 "2017-09-06T11:39:47Z")

</div>

I've just installed the elasticsearch 5.5.2 via rpm. When I try to start the server using service elasticsearch start, I got the following message  
Starting elasticsearch (via systemctl): [OK]

But then when I try curl -X GET '[http://localhost:9200](http://localhost:9200)', it seems the server stopped because I received the following message  
curl: (7) Failed connect to localhost:9200; Connection refused

Below is a part of log file

[2017-09-06T20:19:09,799][INFO][o.e.n.Node] [] initializing ...  
[2017-09-06T20:19:09,856][INFO][o.e.e.NodeEnvironment] [qRCrJ\_z] using [1] data paths, mounts [[/ (rootfs)]], net usable\_space [252.7gb], net total\_space [385.7gb], spins? [unknown], types [rootfs]  
[2017-09-06T20:19:09,856][INFO][o.e.e.NodeEnvironment] [qRCrJ\_z] heap size [1.9gb], compressed ordinary object pointers [true]  
[2017-09-06T20:19:09,879][INFO][o.e.n.Node] node name [qRCrJ\_z] derived from node ID [qRCrJ\_zHQaiKiYo-kErQSw]; set [[node.name](http://node.name)] to override  
[2017-09-06T20:19:09,879][INFO][o.e.n.Node] version[5.5.2], pid[8346], build[b2f0c09/2017-08-14T12:33:14.154Z], OS[Linux/3.10.0-514.26.2.el7.x86\_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0\_141/25.141-b16]  
[2017-09-06T20:19:09,880][INFO][o.e.n.Node] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [aggs-matrix-stats]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [ingest-common]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [lang-expression]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [lang-groovy]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [lang-mustache]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [lang-painless]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [parent-join]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [percolator]  
[2017-09-06T20:19:10,491][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [reindex]  
[2017-09-06T20:19:10,492][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [transport-netty3]  
[2017-09-06T20:19:10,492][INFO][o.e.p.PluginsService] [qRCrJ\_z] loaded module [transport-netty4]  
[2017-09-06T20:19:10,492][INFO][o.e.p.PluginsService] [qRCrJ\_z] no plugins loaded  
[2017-09-06T20:19:11,750][INFO][o.e.d.DiscoveryModule] [qRCrJ\_z] using discovery type [zen]  
[2017-09-06T20:19:12,116][ERROR][o.e.g.GatewayMetaState] [qRCrJ\_z] failed to read local state, exiting...  
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:17, legacy:false, file:/var/lib/elasticsearch/elasticsearch/nodes/0/indices/ebay2vn\_vn\_idx2/\_state/state-17.st]  
at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:150) ~[elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:334) ~[elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.util.IndexFolderUpgrader.upgrade(IndexFolderUpgrader.java:90) ~[elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.util.IndexFolderUpgrader.upgradeIndicesIfNeeded(IndexFolderUpgrader.java:128) ~[elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.gateway.GatewayMetaState.(GatewayMetaState.java:91) [elasticsearch-5.5.2.jar:5.5.2]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0\_141]  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0\_141]  
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0\_141]  
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:49) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825) [elasticsearch-5.5.2.jar:5.5.2]  
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43) [elasticsearch-5.5.2.jar:5.5.2]

What can I do ?

Regards

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 6, 2017, 9:58pm UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/2 "2017-09-06T21:58:16Z")

</div>

After you installed it did you do anything, change configs etc?  
What happens if you `ls -l /var/lib/elasticsearch/`?

---

<div class="post-metadata">

### Author: ![mujtabahussain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mujtabahussain/32/17514_2.png) [@mujtabahussain](https://discuss.elastic.co/u/mujtabahussain)
#### Post date: [September 7, 2017, 1:30am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/3 "2017-09-07T01:30:51Z")

</div>

Hey!

Where is the data being written to by ES? Does that path exist and if so, is it writable?

---

<div class="post-metadata">

### Author: ![poojagupta](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@poojagupta](https://discuss.elastic.co/u/poojagupta)
#### Post date: [September 7, 2017, 4:48am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/4 "2017-09-07T04:48:47Z")

</div>

> [@tkvmai](#):
>
> failed to read [id:17, legacy:false, file:/var/lib/elasticsearch/elasticsearch/n

After looking at the logs, i found that there is unable to connect your cluster. not able to resolve node name.  
Have you edit your node name as per your machine 's host name?  
and do following checks in the configuration file:  
Mention node.name as per your machine name  
Make sure cluster.name is uncommented.

Also check the permission of /var/lib/elasticsearch location

---

<div class="post-metadata">

### Author: ![tkvmai](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@tkvmai](https://discuss.elastic.co/u/tkvmai)
#### Post date: [September 7, 2017, 9:13am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/5 "2017-09-07T09:13:30Z")

</div>

Thanks guys, I fixed the problem. It turned out that I installed the new  
elastic version (5.5) without completely removing all data of the old  
version (1.7). After removing the old version completely, the server starts  
fine.

Mai

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 5, 2017, 9:13am UTC](https://discuss.elastic.co/t/elasticsearch-server-stops-right-after-start/99571/6 "2017-10-05T09:13:30Z")

</div>

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