# How to solve node lock error in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-solve-node-lock-error-in-elasticsearch/51650>\
**Category:** Elasticsearch\
**Created:** [June 2, 2016, 7:10am UTC](https://discuss.elastic.co/t/how-to-solve-node-lock-error-in-elasticsearch/51650 "2016-06-02T07:10:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajnikant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajnikant/32/6490_2.png) [@Rajnikant](https://discuss.elastic.co/u/Rajnikant)\
**Post date:** [June 2, 2016, 7:10am UTC](https://discuss.elastic.co/t/how-to-solve-node-lock-error-in-elasticsearch/51650/1 "2016-06-02T07:10:04Z")

</div>

Elasticsearch is successfully run but after get some response i got this type of error.

"java.lang.IllegalStateException: Failed to obtain node lock, is the following location writable?: [/media/amit/208B7C972F88BACC/elasticsearch-2.1.0/data/elasticsearch]"

How can i resolved it?

---

<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:** [June 2, 2016, 8:11am UTC](https://discuss.elastic.co/t/how-to-solve-node-lock-error-in-elasticsearch/51650/2 "2016-06-02T08:11:12Z")

</div>

> [@Rajnikant](#):
>
> Failed to obtain node lock, is the following location writable

There might be more to the exception telling you the cause of the failure to the obtain the node lock. Do you have that detail as well? If not, you can also start Elasticsearch with trace logging: `./bin/elasticsearch --loggger.env=TRACE` which might print more detail while it's trying to obtain the lock. Either there will be an underlying `IOException` (maybe you do not have write permissions as the error message suggests) or there was a failure obtaining the lock (a race condition with another node started at the same time?). It's also possible that there is a leftover unreleased `node.lock` file? If so, you can just remove this file.

---

<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:** [July 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/how-to-solve-node-lock-error-in-elasticsearch/51650/3 "2017-07-05T22:46:59Z")

</div>


