且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Elasticsearch:无法连接到本地主机端口9200-连接被拒绝

更新时间:2022-03-18 08:19:14

默认情况下,它应绑定到所有本地地址。因此,假设您的防火墙没有网络层问题,我认为可以检查的唯一ES设置是 network.bind_host 并确保未设置或设置为 0.0.0.0 :: 0 或网络的正确IP地址。

By default it should bind to all local addresses. So, assuming you don't have a network layer issue with firewalls, the only ES setting I can think to check is network.bind_host and make sure it is either not set or is set to 0.0.0.0 or ::0 or to the correct IP address for your network.

更新:根据ES 2.3中的注释,您应该设置 network.host

Update: per comments in ES 2.3 you should set network.host instead.