Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Computer - Elasticsearch setup #22730

Closed
Ankiewicz opened this issue Jan 21, 2017 · 2 comments
Closed

New Computer - Elasticsearch setup #22730

Ankiewicz opened this issue Jan 21, 2017 · 2 comments

Comments

@Ankiewicz
Copy link

Ankiewicz commented Jan 21, 2017

[2017-01-21T12:57:37,998][INFO ][o.e.n.Node               ] [] initializing ...
[2017-01-21T12:57:38,019][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/local/var/elasticsearch/elasticsearch_Jonathan]] 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:125) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.1.2.jar:5.1.2]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/local/var/elasticsearch/elasticsearch_Jonathan]] 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:259) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.node.Node.<init>(Node.java:249) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:214) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:306) ~[elasticsearch-5.1.2.jar:5.1.2]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.1.2.jar:5.1.2]
	... 6 more
Karries-iMac:simpleFi_Main Jonathan$ ls -al /usr/local/var/elasticsearch/elasticsearch_Jonathan
total 0
drwxr-xr-x  2 Jonathan  admin   68 Jan 20 23:32 .
drwxr-xr-x  4 Jonathan  admin  136 Jan 20 23:32 ..
Karries-iMac:simpleFi_Main Jonathan$ ```



this started occurring after  `brew install mongodb`

@jasontedor
Copy link
Member

Something does not look right here, we do not use the cluster name as part of the data path anymore. Please remove Elasticsearch:

$ brew remove elasticsearch
$ rm -rf /usr/local/var/elasticsearch
$ rm -rf /usr/local/etc/elasticsearch

and start again:

$ brew install elasticsearch

Lastly, since this looks like an environment problem, I'm going to close this issue. We reserve GitHub for verified bug reports and feature requests. If you have additional questions, please open a topic on the forum.

@golimix
Copy link

golimix commented Apr 26, 2017

failed to obtain node locks, tried [[/Volumes/data/media/git/github/elasticsearch/core/src/main/data/es-5.2-smartsearch-dev]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?

lsof | grep node.lock
java      11918 limix   53w      REG                1,4         0  1760645 /Volumes/data/media/git/github/elasticsearch/core/src/main/data/nodes/0/node.lock

use the lsof to check whether locked by another program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants