报错:
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/liyuC/elasticsearch-6.8.0/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])?
原因:之前未正常关闭es导致
ps aux | grep elasticsearch
执行之后:
39348 0.4 14.3 3769612 267276 pts/0 Sl+ 11月29 4:35 /usr/java/jdk1.8.0_171-amd64/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -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-9174188004577118777 -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/liyuC/elasticsearch-6.8.0 -Des.path.conf=/home/liyuC/elasticsearch-6.8.0/config -Des.distribution.flavor=default -Des.distribution.type=tar -cp /home/liyuC/elasticsearch-6.8.0/lib/* org.elasticsearch.bootstrap.Elasticsearch
kill 停止这个进程就行;
[root@192 ~]# kill 39348
[root@192 ~]# ps aux | grep elasticsearch
root 89999 0.0 0.0 112824 988 pts/2 S+ 14:47 0:00 grep --color=auto elasticsearch
然后重启:
OK!