# Not able to run elasticsearch: elasticsearch dead but subsys locked

**URL:** <https://discuss.elastic.co/t/not-able-to-run-elasticsearch-elasticsearch-dead-but-subsys-locked/96640>\
**Category:** Elasticsearch\
**Created:** [August 10, 2017, 3:42pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-elasticsearch-dead-but-subsys-locked/96640 "2017-08-10T15:42:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shashwat](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@shashwat](https://discuss.elastic.co/u/shashwat)\
**Post date:** [August 10, 2017, 3:42pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-elasticsearch-dead-but-subsys-locked/96640/1 "2017-08-10T15:42:33Z")

</div>

Hi,

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 network.host 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 default.path.data [/var/lib/elasticsearch] where there should not be any; check the logs for details.

Thanks,

---

<div class="post-metadata">

**Author:** ![talevy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/talevy/32/44896_2.png) [@talevy](https://discuss.elastic.co/u/talevy)\
**Post date:** [August 10, 2017, 6:24pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-elasticsearch-dead-but-subsys-locked/96640/2 "2017-08-10T18:24:35Z")

</div>

Hi @shashwat,

I believe you are running into this: [https://github.com/elastic/elasticsearch/pull/24099](https://github.com/elastic/elasticsearch/pull/24099)

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

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

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

1. run Elasticsearch with the default `default.data.path`, in the package's case it is `/var/lib/elasticsearch`

```auto
bin/elasticsearch -Edefault.path.data=/tmp/data

```

1. index data

```auto
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 `default.data.path`, but explicitely set the default path (once again, this is being done for you in the packaging)

```auto
bin/elasticsearch -Edefault.path.data=/tmp/data -Epath.data=/tmp/different_path
...
[2017-08-10T11:20:30,607][INFO][o.e.n.Node] index folder [6td_4mpERZOtJ8DvVyPU4w] in default.path.data [/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 default.path.data [/tmp/data] $here there should not be any; check the logs for details
...

```

Double check you are writing your data to the correct directory

---

<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:** [September 7, 2017, 6:24pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-elasticsearch-dead-but-subsys-locked/96640/3 "2017-09-07T18:24:47Z")

</div>

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