Elasticsearch:无法连接到本地主机端口9200-连接被拒绝 [英] Elasticsearch: Failed to connect to localhost port 9200 - Connection refused

查看:3895
本文介绍了Elasticsearch:无法连接到本地主机端口9200-连接被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用
curl http:// localhost:9200 连接到Elasticsearch时,它工作正常。

When I tried connecting to Elasticsearch using the curl http://localhost:9200 it is working fine.

但是当我运行 curl http:// IpAddress:9200 时,它会抛出一个错误,说

But when I run the curl http://IpAddress:9200 it is throwing an error saying


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

Failed to connect to localhost port 9200: Connection refused

如何解决此错误? / p>

How to resolve this error?

推荐答案

默认情况下,它应绑定到所有本地地址。因此,假设您的防火墙没有网络层问题,我认为可以检查的唯一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.

这篇关于Elasticsearch:无法连接到本地主机端口9200-连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆