ElasticSearch安装错误-curl:(7)无法连接到localhost:9200;拒绝连接 [英] ElasticSearch installation error - curl: (7) Failed connect to localhost:9200; Connection refused
本文介绍了ElasticSearch安装错误-curl:(7)无法连接到localhost:9200;拒绝连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用此教程
我完成了除教程第4步之外的所有操作。
I did everything except step 4 of the tutorial.
在步骤5中,当我运行此命令时:
In step 5, when I run this command:
curl -X GET 'http://localhost:9200'
我收到此错误:
curl: (7) Failed connect to localhost:9200; Connection refused
我尝试了两种方法来修复错误:
I have tried two different things to fix the error:
-
network.bind_host:0.0.0.0
network.bind_host: 0.0.0.0
网络:
主机:192.168.2.229
network : host : 192.168.2.229
但都没有解决问题。
我应该怎么做才能测试Elasticsearch并解决此错误?
What should I do to test Elasticsearch and solve this error?
谢谢。
推荐答案
您只需在弹性搜索配置文件中取消注释以下行:
You just have to uncomment these lines in your elastic-search configuration file:
cluster.name: your_cluster_name
node.name: "Your Node Name"
network.bind_host: localhost
network.publish_host: 0.0.0.0
network.host: 0.0.0.0
这篇关于ElasticSearch安装错误-curl:(7)无法连接到localhost:9200;拒绝连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文