Elasticsearch集群 启动报错:java.lang.IllegalStateException: failed to obtain node locks...

  • 错误信息
[centos@xnzysq20190320001-1 elasticsearch-6.5.0]$ ./bin/elasticsearch
[2020-06-04T01:46:04,912][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-3] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/centos/elasticsearch/data/inkjetcloud]] 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.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.5.0.jar:6.5.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.5.0.jar:6.5.0]
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/centos/elasticsearch/data/inkjetcloud]] 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:297) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.node.Node.(Node.java:296) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.node.Node.(Node.java:265) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:212) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.0.jar:6.5.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.0.jar:6.5.0]
        ... 6 more
[12:19:11.778] [error][status][plugin:[email protected]] Status changed from red to red - [data] Elasticsearch cluster did not respond with license information.
  log   [12:19:11.935] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:11.950] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:11.969] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:11.979] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:12.045] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:12.053] [info][status][plugin:[email protected]] Status changed from uninitialized to green - Ready
  log   [12:19:12.601] [warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
  log   [12:19:12.606] [error][status][plugin:[email protected]] Status changed from uninitialized to red - [data] Elasticsearch cluster did not respond with license information.
  log   [12:19:13.581] [warning][reporting] Enabling the Chromium sandbox provides an additional layer of protection.
 error  [12:19:41.555] [warning][process] UnhandledPromiseRejectionWarning: Error: Request Timeout after 30000ms
    at /home/centos/installation/kibana-6.5.0/node_modules/elasticsearch/src/lib/transport.js:355:15
    at Timeout. (/home/centos/installation/kibana-6.5.0/node_modules/elasticsearch/src/lib/transport.js:384:7)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
    at emitWarning (internal/process/promises.js:65:17)
    at emitPendingUnhandledRejections (internal/process/promises.js:109:11)
    at runMicrotasksCallback (internal/process/next_tick.js:124:9)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
 error  [12:19:41.558] [warning][process] Error: Request Timeout after 30000ms
    at /home/centos/installation/kibana-6.5.0/node_modules/elasticsearch/src/lib/transport.js:355:15
    at Timeout. (/home/centos/installation/kibana-6.5.0/node_modules/elasticsearch/src/lib/transport.js:384:7)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

 

  • 解决方法
[centos@xnzysq20190320001-1 elasticsearch-6.5.0]$ ps -ef | grep elasticsearch

centos   24493     1 30 01:45 pts/0    00:02:17 /usr/java/jdk1.8.0_141/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch.joC5MBuG -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32 -XX:GCLogFileSize=64m -Des.path.home=/home/centos/installation/elasticsearch-6.5.0 -Des.path.conf=/home/centos/installation/elasticsearch-6.5.0/config -Des.distribution.flavor=default -Des.distribution.type=tar -cp /home/centos/installation/elasticsearch-6.5.0/lib/* org.elasticsearc.bootstrap.Elasticsearch -d
centos   24608 24493  0 01:45 pts/0    00:00:00 /home/centos/installation/elasticsearch-6.5.0/modules/x-pack-ml/platform/linux-x86_64/bin/controller
centos   25131 24249  0 01:52 pts/0    00:00:00 grep --color=auto elasticsearch

[centos@xnzysq20190320001-1 elasticsearch-6.5.0]$ kill -9 24493

 

你可能感兴趣的:(Elasticsearch)