Not able to run elasticsearch: elasticsearch dead but subsys locked

(shashwat) #1


I installed elasticsearch 5.5.1. After installation , I was able to run it properly on linux machine. Just, I wanted to access it from my remote windows machine. So, I modified /etc/elasticsearch/elasticsearch.yml file and updated to IP address. Then I restarted the elasticsearch service using
sudo -i service elasticsearch stop
sudo -i service elasticsearch start

but it failed. When I check status of service using:
sudo -i service elasticsearch status , it says:

elasticsearch dead but subsys locked.

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


(Tal Levy) #2

Hi @shashwat,

I believe you are running into this:

We made it so we double-check whether & are set and
hope to verify that we are not writing shard data to both.

Although the setting may have seemed like the culprit, I believe it is how
you are setting that is the problem. Did you run Elasticsearch with default settings, index data, and then change by chance?

Steps for how I reproduce this problem to illustrate using a fresh install of Elasticsearch

  1. run Elasticsearch with the default, in the package's case it is /var/lib/elasticsearch
  1. index data
curl -XPUT 'localhost:9200/twitter/tweet/1' -H 'Content-Type: application/json' -d'                                         
    "user" : "kimchy",           
    "post_date" : "2009-11-15T14:12:12",                          
    "message" : "trying out Elasticsearch"                        
  1. Run Elasticsearch with a data.path that is different to, but explicitely set the default path (once again, this is being done for you in the packaging)
[2017-08-10T11:20:30,607][INFO ][o.e.n.Node               ] index folder [6td_4mpERZOtJ8DvVyPU4w] in [/tmp/data/no$es/0/indices] must be moved to any of [/tmp/different_path/nodes/0/indices] 
[2017-08-10T11:20:30,614][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]                 
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: detected index data in [/tmp/data] $here there should not be any; check the logs for details

Double check you are writing your data to the correct directory

(system) #3

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