When I tried connecting to Elasticsearch using the
curl http://localhost:9200
it is working fine.
But when I run the curl http://IpAddress:9200
it is throwing an error saying
Failed to connect to localhost port 9200: Connection refused
How to resolve this error?
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.
Update: per comments in ES 2.3 you should set network.host
instead.