ElasticSearch 報錯 failed to obtain node locks


failed to obtain node locks, tried [[/var/lib/elasticsearch]] with lock id [0];

錯誤信息:

failed to obtain node locks, tried [[/var/lib/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes]

Elasticsearch version 6.8.2

解決方法一:

查找ES進程號,殺掉進程然后重啟。

ps -ef | grep elastic

kill -9 進程號

解決方法二:

給予操作ES的管理員權限,chown -R 用戶名:組名 文件目錄 

chown -R elastic /var/lib/elasticsearch/

解決方法三:

可能是因為安裝了ES的插件,修改了配置文件 elasticsearch.yml

將這些注釋或刪除掉后重啟

http.cors.allow-origin: 'http://localhost:1358'
http.cors.enabled: true
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: true

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM