近期部署elasticsearch后,启动时发现一直报如下错误:
curl: (7) Failed connect to localhost:9200; Connection refused
部署的版本为elasticsearch-7.13.2,排查原因是因为开启了ssl认证。
解决方法:
在/opt/software/elasticsearch-7.13.2/config下修改elasticsearch.yml配置,添加如下内容:
xpack.security.http.ssl.enabled: false
日志报错2如下:文章来源:https://www.toymoban.com/news/detail-743238.html
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,并最后添加如下内容:vim ./config/elasticsearch.yml文章来源地址https://www.toymoban.com/news/detail-743238.html
node.max_local_storage_nodes: 2
到了这里,关于elasticsearch无法访问9200端口的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!