Curl: (7) Failed to connect to 172.16.128.208 port 9200: Connection refused

Hi Everyone,
I am installing elasticsearch on a VM (vmware workstation - NIC: bridged) Host machine (Windows Server) I am getting an error after trying to curl to the IP address of the machine running elasticsearch. I was hoping to get some direction.

After installing using the directions on https://www.elastic.co/guide/en/elasticsearch/reference/7.10/setup.html
I tested using curl. locally on the machine and noticed that I was able to get a response just fine. I switched over to another host on the same subnet and I was able to ping but curl 172.16.128.208:9200fails

I have tried several modifications to the elasticsearch.yml file and have had no luck so far.
I have the logs and current .yml config in a pastebin if anyone would like to check it out. (forgive me for the logs... I have been here for a couple of hours, researching and modifying settings)

/var/Log/elasticsearch.log: https://pastebin.com/Gm8xLCG3
Elasticsearch.yml: https://pastebin.com/yEDNcrwP

Welcome to our community! :smiley:

[2020-12-08T17:10:13,611][INFO ][o.e.t.TransportService   ] [ubuntu] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}

That's why, it's only listening on loopback. Try setting network.host in your config to 0.0.0.0 to listen to all interfaces on the host.

1 Like

Hi!
Thank you for the welcome and reaching out. I checked the elasticsearch.yml and I confirmed that the network.host is configured to 0.0.0.0

    Network.host: 0.0.0.0
    http.port: 9200
    Default list of host is: ["127.0.0.1","[::1]" ]
    discovery.seed_hosts: ["172.16.128.208"]

Update: I found out what I was doing wrong...
I was not removing the comment from the yml file. haha :joy:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.