ElasticSearch installation error - curl: (7) Failed connect to localhost:9200; Connection refused

邮差的信 提交于 2019-12-10 09:29:24

问题


I'm trying to configure ElasticSearch with this tutorial

I did everything except step 4 of the tutorial.


In step 5, when I run this command:

curl -X GET 'http://localhost:9200'

I get this error:

curl: (7) Failed connect to localhost:9200; Connection refused

I have tried two different things to fix the error:

  1. network.bind_host: 0.0.0.0

  2. network : host : 192.168.2.229

But neither solved the problem.

What should I do to test Elasticsearch and solve this error?

Thanks.


回答1:


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



回答2:


run this command.

curl -X GET http://localhost:9200


来源:https://stackoverflow.com/questions/36631592/elasticsearch-installation-error-curl-7-failed-connect-to-localhost9200-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!