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

**URL:** https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944
**Category:** Elasticsearch
**Created:** [June 16, 2016, 4:15am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944 "2016-06-16T04:15:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![snipervelli](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@snipervelli](https://discuss.elastic.co/u/snipervelli)
#### Post date: [June 16, 2016, 4:15am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944/1 "2016-06-16T04:15:55Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [June 16, 2016, 8:19am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944/2 "2016-06-16T08:19:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![snipervelli](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@snipervelli](https://discuss.elastic.co/u/snipervelli)
#### Post date: [June 16, 2016, 5:00pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944/3 "2016-06-16T17:00:37Z")

</div>

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.

---

<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: [July 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-after-changing-default-data-and-log-location/52944/4 "2017-07-05T22:43:10Z")

</div>


