# Elasticsearch suddenly stop

**URL:** <https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754>\
**Category:** Elasticsearch\
**Created:** [February 10, 2019, 2:20pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754 "2019-02-10T14:20:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmortada](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mmortada](https://discuss.elastic.co/u/mmortada)\
**Post date:** [February 10, 2019, 2:20pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/1 "2019-02-10T14:20:02Z")

</div>

hi all

i was configuring elastic search node to be integrated with Bitbucket DC cluster and it was working fine suddenly stop working when i tried to start the service it start successfully for less than 1 second then stop automatically

[root@ies-esd-bitbucketdc-esearch ekL8YpzHTFyAyPKTeYpr9Q]# systemctl start elasticsearch.service  
[root@ies-esd-bitbucketdc-esearch ekL8YpzHTFyAyPKTeYpr9Q]# systemctl status elasticsearch.service

- elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: active (running) since Sun 2019-02-10 14:19:30 GMT; 1s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 22668 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
Main PID: 22670 (java)  
CGroup: /system.slice/elasticsearch.service  
`-22670 /bin/java -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.net...

Feb 10 14:19:30 ies-esd-bitbucketdc-esearch systemd[1]: Starting Elasticsearch...  
Feb 10 14:19:30 ies-esd-bitbucketdc-esearch systemd[1]: Started Elasticsearch.  
[root@ies-esd-bitbucketdc-esearch ekL8YpzHTFyAyPKTeYpr9Q]# systemctl status elasticsearch.service

- elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: failed (Result: exit-code) since Sun 2019-02-10 14:19:31 GMT; 2s ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 22670 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p {PID\_DIR}/elasticsearch.pid --quiet -Edefault.path.logs={LOG\_DIR} -Edefault.path.data={DATA\_DIR} -Edefault.path.conf={CONF\_DIR} (code=exited, status=1/FAILURE)  
Process: 22668 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
Main PID: 22670 (code=exited, status=1/FAILURE)

Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at java.nio.file.Files.createDirectory(Files.java:674)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at java.nio.file.Files.createDirectories(Files.java:767)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at org.elasticsearch.common.PidFile.create(PidFile.java:69)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at org.elasticsearch.common.PidFile.create(PidFile.java:55)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:325)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch[22670]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd[1]: Unit elasticsearch.service entered failed state.  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd[1]: elasticsearch.service failed.

can you please advise ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 10, 2019, 2:21pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/2 "2019-02-10T14:21:29Z")

</div>

What does the Elasticsearch logs say?

---

<div class="post-metadata">

**Author:** ![mmortada](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mmortada](https://discuss.elastic.co/u/mmortada)\
**Post date:** [February 10, 2019, 2:24pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/3 "2019-02-10T14:24:09Z")

</div>

[root@ies-esd-bitbucketdc-esearch elasticsearch]# pwd  
/var/log/elasticsearch

[root@ies-esd-bitbucketdc-esearch elasticsearch]# cat elasticsearch.log  
[2019-01-30T13:40:19,930][INFO][o.e.n.Node] [SNRolwD] stopping ...  
[2019-01-30T13:40:20,164][INFO][o.e.n.Node] [SNRolwD] stopped  
[2019-01-30T13:40:20,165][INFO][o.e.n.Node] [SNRolwD] closing ...  
[2019-01-30T13:40:20,280][INFO][o.e.n.Node] [SNRolwD] closed  
[root@ies-esd-bitbucketdc-esearch elasticsearch]# cat elasticsearch\_deprecation.log

[2018-11-28T09:24:18,537][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2018-11-30T09:29:50,052][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2018-11-30T09:29:50,364][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2018-11-30T09:32:28,368][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2018-11-30T09:32:29,362][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:13,814][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:14,096][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:15,550][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:16,228][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:18,777][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]  
[2019-01-03T10:09:38,758][WARN][o.e.d.c.ParseField] Deprecated field [type] used, replaced by [match\_phrase and match\_phrase\_prefix query]

cat /var/log/messages|grep elasticsearch  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /var/run/elasticsearch  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: Likely root cause: java.nio.file.AccessDeniedException: /var/run/elasticsearch  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at java.nio.file.Files.createDirectory(Files.java:674)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at java.nio.file.Files.createDirectories(Files.java:767)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.common.PidFile.create(PidFile.java:69)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.common.PidFile.create(PidFile.java:55)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:325)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.cli.Command.main(Command.java:88)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch elasticsearch: Refer to the log for complete error details.  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd: Unit elasticsearch.service entered failed state.  
Feb 10 14:19:31 ies-esd-bitbucketdc-esearch systemd: elasticsearch.service failed.

---

<div class="post-metadata">

**Author:** ![mmortada](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mmortada](https://discuss.elastic.co/u/mmortada)\
**Post date:** [February 10, 2019, 2:24pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/4 "2019-02-10T14:24:56Z")

</div>

[root@ies-esd-bitbucketdc-esearch elasticsearch]# cat /etc/redhat-release  
CentOS Linux release 7.4.1708 (Core)  
[root@ies-esd-bitbucketdc-esearch elasticsearch]# uname -a  
Linux ies-esd-bitbucketdc-esearch 3.10.0-693.21.1.el7.x86\_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux  
[root@ies-esd-bitbucketdc-esearch elasticsearch]# rpm -qa |grep -i elastic  
elasticsearch-5.5.3-1.noarch

---

<div class="post-metadata">

**Author:** ![mmortada](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mmortada](https://discuss.elastic.co/u/mmortada)\
**Post date:** [February 10, 2019, 2:25pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/5 "2019-02-10T14:25:47Z")

</div>

[root@ies-esd-bitbucketdc-esearch elasticsearch]# cat elasticsearch.yml

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

#cluster.name: my-application

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

#node.name: node-1

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

#path.data: /path/to/data

# 

# Path to log files:

# 

#path.logs: /path/to/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

#bootstrap.memory\_lock: true

# 

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: 0.0.0.0

# 

# Set a custom port for HTTP:

# 

#http.port: 9200

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# 

#discovery.zen.minimum\_master\_nodes: 3

# 

# For more information, consult the zen discovery module documentation.

# 

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
action.auto\_create\_index: false

---

<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:** [March 10, 2019, 2:25pm UTC](https://discuss.elastic.co/t/elasticsearch-suddenly-stop/167754/6 "2019-03-10T14:25:48Z")

</div>

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