Elasticsearch suddenly stop

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
    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
    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 ?

What does the Elasticsearch logs say?

[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.

[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

[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

---------------------------------- 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

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