ES doesn't start


(foo) #1

Hello i'am a new user of ES, i installed it few days ago and it was runnig very well untill i tried to do this command that i've found on the ES website.

./bin/elasticsearch -d -Ecluster.name=my_cluster -Enode.name=node_1

now i have this everytime that i run ./bin/elasticsearch :

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. [2018-07-11T13:50:12,571][INFO ][o.e.n.Node ] [] initializing ... [2018-07-11T13:50:12,657][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/mohamed/elasticsearch-6.3.1/data/elasticsearch]] 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:140) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.3.1.jar:6.3.1] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.3.1.jar:6.3.1] Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/mohamed/elasticsearch-6.3.1/data/elasticsearch]] 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:243) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.node.Node.<init>(Node.java:270) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.node.Node.<init>(Node.java:252) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.1.jar:6.3.1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.1.jar:6.3.1] ... 6 more
i searched on the internet but i coudln't find anything helpful so i need help to this issue.


(Ant) #2

looks like you're running 6.3.1 (always helpful to let people know what version you're on) I run elastic as a service rather than from the commandline but it strikes me from that error it thinks you're trying to run it twice on the same box with the same data directory. Do you see process running for it already if you run top?

a cliche but have you tried turning the box off and on again? if it is that you have it as a service that locked the data directory but crashed when you tried to spin up a second instance on the same machine then that will kill it off releasing the files and start it all back up again.


(foo) #3

Hello @Ant, thank you for your quick reply i just restarted my computer and it started to work thanks


(Ant) #4

sovles 90% of all IT problems :slight_smile:


(system) #5

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