Elasticsearch, Failed to obtain node lock, is the following location writable

后端 未结 13 2343
予麋鹿
予麋鹿 2020-12-05 12:45

Elasticsearch won\'t start using ./bin/elasticsearch. It raises the following exception:

- ElasticsearchIllegalStateException[Failed to obtain n         


        
13条回答
  •  北海茫月
    2020-12-05 13:21

    As with many others here replying, this was caused by wrong permissions on the directory (not owned by the elasticsearch user). In our case it was caused by uninstalling Elasticsearch and reinstalling it (via yum, using the official repositories).

    As of this moment, the repos do not delete the nodes directory when they are uninstalled, but they do delete the elasticsearch user/group that owns it. So then when Elasticsearch is reinstalled, a new, different elasticsearch user/group is created, leaving the old nodes directory still present, but owned by the old UID/GID. This then conflicts and causes the error.

    A recursive chown as mentioned by @oleksii is the solution.

提交回复
热议问题