Elasticsearch fails shortly after starting (CentOS 7, ES 5.6.*, installed using RPM)

Getting the following systemd log entries when attempting to start ElasticSearch:

Dec 22 21:57:42 mydomain.com systemd[1]: Starting Elasticsearch...
Dec 22 21:57:42 mydomain.com systemd[1]: Started Elasticsearch.
Dec 22 21:57:54 mydomain.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Dec 22 21:57:54 mydomain.com systemd[1]: Unit elasticsearch.service entered failed state.
Dec 22 21:57:54 mydomain.com systemd[1]: elasticsearch.service failed.

how do I debug this to figure out what is causing the problem?

I saw in a similar post that a respondent asked what the following command produced:

ls -ld /var/ /var/log/ /var/log/elasticsearch/ /usr/share/elasticsearch/ /usr/share/elasticsearch/bin/

This command produces the following result:

drwxr-xr-x  6 root          root          4096 Dec 22 21:19 /usr/share/elasticsearch/
drwxr-xr-x  2 root          root          4096 Dec 22 21:19 /usr/share/elasticsearch/bin/
drwxr-xr-x 24 root          root          4096 Dec 22 19:55 /var/
drwxr-xr-x 14 root          root          4096 Dec 22 22:01 /var/log/
drwxr-x---  2 elasticsearch elasticsearch 4096 Dec 22 21:25 /var/log/elasticsearch/

Hope that is useful in answering the original post! :slight_smile:

The following is also returned when I check the status of Elasticsearch using sudo service elasticsearch status:

● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2018-12-22 21:57:54 EST; 14min ago
     Docs: http://www.elastic.co
  Process: 31663 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: 31661 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 31663 (code=exited, status=1/FAILURE)

Is there anything in the Elasticsearch logs?

Hi Mark,

I was able to figure out the problem in my case. I was installing the eDirectory platform (edirectory.com), which calls for ElasticSearch, but I accidentally installed a newer version of ES that isn't yet supported by eDirectory, and when I uninstalled the newer ES and installed the older version, the /var/tmp/elasticsearch folder was giving me trouble. I was able to solve the problem by uninstalling ES, deleting the folder, and reinstalling.

Thanks for following up! I really appreciate it!

Chris Holowatyj

Chief Development Officer

chris@keddy.ca | (905) 713-4520

Sent using Polymail

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