Elasticsearch 5.6.15 do not start after install

Elasticsearch do not start after installation due to below error:
[9.7gb], spins? [possibly], types [ext4]
[2019-07-23T13:43:44,765][INFO ][o.e.e.NodeEnvironment ] [6yEOT5I] heap size [1.9gb], compressed ordinary object pointers [true]
[2019-07-23T13:43:44,771][ERROR][o.e.n.Node ] detected index data in default.path.data [/var/lib/elasticsearch/nodes/0/indices] where there should not be any
[2019-07-23T13:43:44,772][INFO ][o.e.n.Node ] index folder [leV9g4DMR_WweW7oOMwD6A] in default.path.data [/var/lib/elasticsearch/nodes/0/indices] must be moved to any of [/opt/elasticsearch/data/nodes/0/indices]
[2019-07-23T13:43:44,774][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

I dont see this error on our lab environment after elastic installation but this same error has been observed in customer environment everytime. To resolve the issue I have to manually delete the indices folder and then restart the Elastic process.
I dont know why this is happening on customer environment although the installation process that I am following on the server is same. Can some assist on this please.

Just FYI, Below is my entry in elasticsearch.yml .It is default value that gets configured by Elasticsearch during install .Not sure how come indices is getting stored under /var/lib/elasticsearch/nodes/0/indices directory

----------------------------------- Paths ------------------------------------

Path to directory where to store the data (separate multiple locations by comma):

path.data: /opt/elasticsearch/data


I got the root cause for this issue.Here is my finding.

We manually deleted the indices directory and restarted elasticsearch to bring it up successfully. Root cause for this issue is Elasticsearch has changed the data & log path in version 5.6.15.

version 5.2.0 -> Data Path : /var/lib/elasticsearch , Log path: /var/log/elasticsearch
version 5.6.15 -> Data Path:/opt/elasticsearch/data , Log path: /opt/elasticsearch/log

Unfortunately, Elasticsearch do not delete indices directory during uninstall so the indices remained on that directory and this residual indices was not allowing the new Elasticsearch to startup since it do not expect any indices in that directory.

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