安装x -pack插件的时的问题

[wangshumin@CentOSNode2 elasticsearch-5.3.1]$ elasticsearch
[2018-05-05T10:13:30,863][INFO ][o.e.n.Node               ] [name_CentOSNode2] initializing ...
[2018-05-05T10:13:30,950][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [name_CentOSNode2] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/wangshumin/ekl/elasticsearch-5.3.1/data/elasticsearchCluster]] 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:127) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:58) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.3.1.jar:5.3.1]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/wangshumin/ekl/elasticsearch-5.3.1/data/elasticsearchCluster]] 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.(NodeEnvironment.java:260) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.node.Node.(Node.java:262) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.node.Node.(Node.java:242) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:242) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.3.1.jar:5.3.1]

... 6 more



当我在开启多个elasticsearch 实例时,遇到上述异常,解决方法是:在 config/elasticsearch.yml文件中新增一个配置变量:


node.max_local_storage_nodes: 256  #replace 256 with another num that greater than 1 

你可能感兴趣的:(ELK)