# Elasticsearch dead but subsys locked

**URL:** <https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066>\
**Category:** Elasticsearch\
**Created:** [November 30, 2020, 1:16pm UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066 "2020-11-30T13:16:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ItsMee](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@ItsMee](https://discuss.elastic.co/u/ItsMee)\
**Post date:** [November 30, 2020, 1:16pm UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/1 "2020-11-30T13:16:48Z")

</div>

Dear All,

I have tried to restart the elasticsearch but getting 'elasticsearch dead but subsys locked' after start. I have removed the lock the file(elasticsearch) under /var/lock/subsys/ multiple times but no luck.

Could someone please help me here?

---

<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:** [December 2, 2020, 12:42am UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/2 "2020-12-02T00:42:09Z")

</div>

Welcome to our community! 😃

Can you please post your Elasticsearch log. What version are you running?

---

<div class="post-metadata">

**Author:** ![ItsMee](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@ItsMee](https://discuss.elastic.co/u/ItsMee)\
**Post date:** [December 2, 2020, 11:55am UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/3 "2020-12-02T11:55:07Z")

</div>

Hi Mark,  
Version is 5.6.

[2020-12-02T10:31:55,667][INFO][o.e.n.Node] [elasticsearch-node-client-8] initializing ...  
[2020-12-02T10:31:55,714][ERROR][o.e.b.Bootstrap] Exception  
java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch/elk\_prd\_5]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?  
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:261) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.node.Node.(Node.java:245) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.6.11.jar:5.6.11]  
[2020-12-02T10:31:55,723][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [elasticsearch-node-client-8] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch/elk\_prd\_5]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.11.jar:5.6.11]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.11.jar:5.6.11]  
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/var/lib/elasticsearch/elk\_prd\_5]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1])?

---

<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:** [December 2, 2020, 12:43pm UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/4 "2020-12-02T12:43:23Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Anyway, here the problem is that one node already started and was killed without removing a lock file.  
The lock is somewhere in `/var/lib/elasticsearch/elk_prd_5`.

Note that this version is a way too old to be supported. You should really upgrade to 7.10.

---

<div class="post-metadata">

**Author:** ![ItsMee](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@ItsMee](https://discuss.elastic.co/u/ItsMee)\
**Post date:** [December 3, 2020, 11:59am UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/5 "2020-12-03T11:59:43Z")

</div>

Hi David,

Thanks for your reply. I am getting into same situation even after deleting lock.

---

<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:** [December 3, 2020, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/6 "2020-12-03T13:33:22Z")

</div>

What exactly did you remove?  
What is the output of:

```auto
ls -la /var/lib/elasticsearch/elk_prd_5

```

---

<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 31, 2020, 1:33pm UTC](https://discuss.elastic.co/t/elasticsearch-dead-but-subsys-locked/257066/7 "2020-12-31T13:33:33Z")

</div>

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