ElasticSearch - Failed to obtain node locks

Rajeev Bhat :

I have a single node ElasticSearch Cluster in local. I am unable to start elasticsearch service. Getting this error:

[bhatr@LRVCEM27547]~/elasticsearch-6.8.8/bin% elasticsearch                                                                                          5:30AM
[2020-04-27T05:30:14,280][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [unknown] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/remote/users/bhatr/elasticsearch-6.8.8/data]] 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:163) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.8.jar:6.8.8]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.8.jar:6.8.8]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/remote/users/bhatr/elasticsearch-6.8.8/data]] 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.<init>(NodeEnvironment.java:300) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.node.Node.<init>(Node.java:296) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.8.jar:6.8.8]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.8.jar:6.8.8]
        ... 6 more

I have tried the answers of this and this post but couldn't resolve. OS: RedHat 7.5

  1. All directories in elasticsearch have write permission
  2. There is no other elastic instance running , I have confirmed through ps -ef | grep java

Please help to resolve this.

Opster Elasticsearch Ninja :

The detailed cause of this error and troubleshooting is explained in this opster's guide.

But still, it was not sufficient(missed rebooting step) so suggested OP to delete the data folder, kill all the existing ES processes and reboot his machine which solved the issue.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

failed to obtain node locks, tried [/usr/share/elasticsearch/data];

getting error " failed to obtain node locks, tried " when starting second node in elastic search

Failed to obtain broadcast value

Failed to obtain Jenkins slave

java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0 when start k8s elasticsearch cluster pod

node js and postgresql query locks?

Failed to obtain a cell from its DataSource

passport-facebook Failed to obtain access token

Playground Xcode : Failed to obtain sandbox extension

angular post to obtain access token failed

Failed to obtain the location of the Google Cloud Storage bucket

How to obtain scoring between 0 and 1 with ElasticSearch?

Unable to insert a record into ElasticSearch using node.js http.request - MapperParsingException[failed to parse]

filebeat failed to connect to elasticsearch

Elasticsearch failed to resolve host

Elasticsearch failed to start on macos

Elasticsearch failed to parse [timestamp]

failed to execute script Elasticsearch

Failed to find analyzer Elasticsearch

With in-mem database for testing, entity manager not releasing locks 'unable to obtain lock'

How to obtain the stderr on node-fluent-ffmpeg

Elasticsearch: Job for elasticsearch.service failed

RSelenium - how to obtain a node's child node number and their xpaths

obtain the address of a node given a node address in a linked list

datadog elasticsearch check failed with ReadTimeout

Elasticsearch 5.0.2 failed to search for keyword

Failed to establish connection error with elasticsearch

To obtain logs from the last 5 months that show jobs that have failed

java.security.UnrecoverableKeyException: Failed to obtain information about private key