Can't start elasticsearch after changing default data and log location

Hi all,
After changing my elasticsearch configuration file at /etc/elasticsearch/elasticsearch to point to a different data and log location from the default, my elasticsearch service dies after about 17 seconds.

Notes

  1. I changed the file owner of the new location to be owned by elasticsearch

● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2016-06-16 00:08:13 EDT; 569ms ago
Docs: http://www.elastic.co
Process: 18029 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
Process: 18024 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 18029 (code=exited, status=1/FAILURE)

Jun 16 00:08:13 elkserver elasticsearch[18029]: at <<>>
Jun 16 00:08:13 elkserver elasticsearch[18029]: at org.elasticsearch.node.Node.(Node.java:213)
Jun 16 00:08:13 elkserver elasticsearch[18029]: at org.elasticsearch.node.Node.(Node.java:140)
Jun 16 00:08:13 elkserver elasticsearch[18029]: at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
Jun 16 00:08:13 elkserver elasticsearch[18029]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
Jun 16 00:08:13 elkserver elasticsearch[18029]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
Jun 16 00:08:13 acyelkserver elasticsearch[18029]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Jun 16 00:08:13 elkserver systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jun 16 00:08:13 elkserver systemd[1]: Unit elasticsearch.service entered failed state.
Jun 16 00:08:13 elkserver systemd[1]: elasticsearch.service failed.

Any help will be appreciated. I am not sure if other locations have to be updated.

Hey

Do you have a full stack trace? Either from the systemd output or alternatively from the elasticsearch logfile? This just looks like a snippet. You could try to use journalctl -f when you start Elasticsearch and paste the output.

--Alex

Hi Alex i followed your suggestion about using journalctl -f after restarting elasticsearch. I was able to figure out the issue as the journalctl -f gave me more information about the problem. In my case my elasticsearch.yml had issues. Thanks a lot for pointing me to the right direction.