文章目录
(二)解决elasticsearch配置network.host: 0.0.0.0导致elasticsearch服务启动不成功的问题
一、问题概述
本人在本地的虚拟机linux上安装的elasticsearch。
当修改 elasticsearch.yml 文件的 network.host: 0.0.0.0 时,引起了一系列异常,导致服务无法成功启动。
network.host: 0.0.0.0
引起的问题:elasticsearch服务进程启动一会之后,通过jps命令查看到进程关闭,命令行不提示错误。打开另一个命令行窗口,输入 curl 127.0.0.1:9200 提示 curl: (7) couldn’t connect to host 错误。
二、解决思路
elasticsearch下有个logs包,里面有个elasticsearch.log 日志文件,可查看错误日志排查问题。
错误日志如下:
9-04-26T03:28:02,929][DEBUG][o.e.a.ActionModule ] [localhost.localdomain] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-04-26T03:28:03,778][INFO ][o.e.d.DiscoveryModule ] [localhost.localdomain] using discovery type [zen] and seed hosts providers [settings]