# ElasticSearch won't start when path.logs and path.data is changed

**URL:** <https://discuss.elastic.co/t/elasticsearch-wont-start-when-path-logs-and-path-data-is-changed/40070>\
**Category:** Elasticsearch\
**Created:** [January 25, 2016, 11:49pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-when-path-logs-and-path-data-is-changed/40070 "2016-01-25T23:49:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reynold](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@reynold](https://discuss.elastic.co/u/reynold)\
**Post date:** [January 25, 2016, 11:49pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-when-path-logs-and-path-data-is-changed/40070/1 "2016-01-25T23:49:25Z")

</div>

I have followed the guide[here](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7) to install ELK in CentOS 7, and it worked.

The next day, I tried to change the path of the data and logs on another volume, but failed, so I changed it to local directory. ( /etc/elasticsearch/elasticsearch.yml)

Here's my config

```
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /opt/elasticsearch/data
path.logs: /opt/elasticsearch/logs

```

But, when I restart ElasticSearch this is what I get:

```
 elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-01-25 06:33:40 UTC; 9s ago
     Docs: http://www.elastic.co
  Process: 22213 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: 22212 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 22213 (code=exited, status=1/FAILURE)

elasticsearch[22213]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1074)
elasticsearch[22213]: at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1061)
elasticsearch[22213]: at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:88)
elasticsearch[22213]: at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:217)
elasticsearch[22213]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:256)
elasticsearch[22213]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
elasticsearch[22213]: Refer to the log for complete error details.
systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Unit elasticsearch.service entered failed state.
systemd[1]: elasticsearch.service failed.

```

I did set the ownership to elasticsearch:

```
/opt/elasticsearch
[root@localhost elasticsearch]# ls -al
total 4
drwxr-xr-x. 4 elasticsearch elasticsearch 28 Jan 26 07:29 .
drwxr-xr-x. 7 root root 4096 Jan 26 07:29 ..
drwxr-xr-x. 2 elasticsearch elasticsearch 6 Jan 26 07:29 data
drwxr-xr-x. 2 elasticsearch elasticsearch 6 Jan 26 07:29 logs

```

I even tried on a fresh CentOS 7, but the outcome is same. What am I missing here?

Note: I'm new to this ELK, and just started experimenting with it as alternative for Splunk.

I will appreciate for any help I can get.

Thanks!

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [January 26, 2016, 12:21pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-when-path-logs-and-path-data-is-changed/40070/2 "2016-01-26T12:21:54Z")

</div>

Hi Reynold,

the output says:

> [@reynold](#):
>
> elasticsearch[22213]: Refer to the log for complete error details.

From what I can infer from the source code, there is a problem when loading settings.

Are there more details in the log files in /opt/elasticsearch/logs?

Daniel

---

<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, 11:21pm UTC](https://discuss.elastic.co/t/elasticsearch-wont-start-when-path-logs-and-path-data-is-changed/40070/3 "2017-07-05T23:21:34Z")

</div>


