網(wǎng)站做記錄訪客百度貼吧網(wǎng)頁版
????????近期部署elasticsearch后,啟動時發(fā)現(xiàn)一直報如下錯誤:
curl: (7) Failed connect to localhost:9200; Connection refused
部署的版本為elasticsearch-7.13.2,排查原因是因為開啟了ssl認證。
解決方法:
在/opt/software/elasticsearch-7.13.2/config下修改elasticsearch.yml配置,添加如下內(nèi)容:
xpack.security.http.ssl.enabled: false
日志報錯2如下:
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/data/es/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])?
解決方法:
????????修改配置文件elasticsearch.yml,并最后添加如下內(nèi)容:vim ./config/elasticsearch.yml
node.max_local_storage_nodes: 2