# Default.path.data issue when path.data is changed in elasticsearch

**URL:** <https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288>\
**Category:** Elasticsearch\
**Created:** [November 12, 2017, 3:55am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288 "2017-11-12T03:55:16Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 12, 2017, 3:55am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/1 "2017-11-12T03:55:16Z")

</div>

Hi,

I am getting the following error when I change path.data to /opt/elk,

`java.lang.IllegalStateException: detected index data in default.path.data [/var/lib/elasticsearch] where there should not be any; check the logs for details.`

I fixed it by deleting nodes in /var/lib/elasticsearch and restarted elasticsearch.

But my question is, shall I delete /var/lib/elasticsearch directory to avoid future issues?

Please suggest me..

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 12, 2017, 4:52am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/2 "2017-11-12T04:52:28Z")

</div>

What version are you on?  
Please show the complete error line.  
Please show your configuration file.

Also we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! 😉

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 12, 2017, 5:02am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/3 "2017-11-12T05:02:01Z")

</div>

> [@warkolm](#):
>
> What version are you on?

Elasticsearch 5.5.1

> [@warkolm](#):
>
> Please show the complete error line.

```
[2017-11-11T18:31:53,983][ERROR][o.e.b.Bootstrap] Exception
java.lang.IllegalStateException: detected index data in default.path.data [/var/lib/elasticsearch] where there should not be any; check the logs for details
        at org.elasticsearch.node.Node.checkForIndexDataInDefaultPathData(Node.java:575) ~[elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.node.Node.<init>(Node.java:274) ~[elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.node.Node.<init>(Node.java:244) ~[elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:232) ~[elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.5.1.jar:5.5.1]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.5.1.jar:5.5.1]
[2017-11-11T18:31:53,988][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [prod-coordinating-node] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: detected index data in default.path.data [/var/lib/elasticsearch] where there should not be any; check the logs for details
"/opt/logs/prod.log" 392L, 53453C

```

> [@warkolm](#):
>
> Please show your configuration file.

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

```

> [@warkolm](#):
>
> Also we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! 😉

For my project, I am exactly using Elasticsearc, Logstash, and Kibana. So I named it as ELK. 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 12, 2017, 5:11am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/4 "2017-11-12T05:11:05Z")

</div>

It looks like you started Elasticsearch with the defaults and added data before changing the paths?

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 12, 2017, 5:16am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/5 "2017-11-12T05:16:37Z")

</div>

I am not ingesting any data to elasticsearch at this point. I am still in cluster build out phase and encountered this issue. One more thing to add, I have installed Kibana on the same node. That might have caused the issue because Kibana by default has an index named '.kibana'.

Also, I have read this issue is in elasticsearch 5.3.x and was fixed in further versions. Is this still an issue in 5.5.x too?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 12, 2017, 6:11am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/6 "2017-11-12T06:11:40Z")

</div>

I remember that issue and I thought it has been fixed as well. Any chance you can try the same scenario with the latest elasticsearch version?

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 13, 2017, 3:01am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/7 "2017-11-13T03:01:00Z")

</div>

I already tried with elasticsearch 5.5.1 and got this issue. When you say latest version, is it 5.6.4?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2017, 6:18am UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/8 "2017-11-13T06:18:48Z")

</div>

Yes.

If you can reproduce it in 5.6, it might be worth opening an issue? Cc @jasontedor

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [November 13, 2017, 6:22pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/9 "2017-11-13T18:22:42Z")

</div>

> [@amruth](#):
>
> But my question is, shall I delete /var/lib/elasticsearch directory to avoid future issues?

You do not need to delete `/var/lib/elasticsearch`, only relocate any index data that you have there. The message you are seeing should only appear if there are indeed indices in `/var/lib/elasticsearch`. Are you saying that you're still getting this message even though that path is now free of index data? Can you confirm by providing the output of `tree /var/lib/elasticsearch`?

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 28, 2017, 3:27pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/10 "2017-11-28T15:27:54Z")

</div>

Hi David,

I am not working on 5.6 right now, but in future if I get the same issue, will definitely post the issue.

Thanks

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 28, 2017, 3:29pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/11 "2017-11-28T15:29:12Z")

</div>

> [@jasontedor](#):
>
> Are you saying that you're still getting this message even though that path is now free of index data?

I am not getting this message after it is made free of index data.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [November 28, 2017, 3:42pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/12 "2017-11-28T15:42:30Z")

</div>

Then this is behaving as expected.

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [November 28, 2017, 5:36pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/13 "2017-11-28T17:36:47Z")

</div>

Why would it have to send the error message even after specifying path.data to a different location other than /var/lib/elasticsearch.

Is it because of Kibana default index? (I am running Kibana on the same node)

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [November 28, 2017, 5:47pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/14 "2017-11-28T17:47:34Z")

</div>

The problem is `default.path.data` will still be set to `/var/lib/elasticsearch` and if there is index data there then the check trips.

---

<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:** [December 26, 2017, 5:47pm UTC](https://discuss.elastic.co/t/default-path-data-issue-when-path-data-is-changed-in-elasticsearch/107288/15 "2017-12-26T17:47:40Z")

</div>

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