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

I am trying to configure ElasticSearch using 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 tried two different things to fix the error:

  • network.bind_host: 0.0.0.0

  • network: host: 192.168.2.229

But the problem is not resolved.

What should I do to check Elasticsearch and resolve this error?

Thank.

+4
source share
3 answers

You just need to uncomment these lines in the 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
source

, -X GET http://localhost: 9200, curl: (7) localhost: 9200; - , ????

0

run this command.

curl -X GET http://localhost:9200
-2
source

All Articles