ElasticSearch instance not reachable from outside the server - Azure Windows 2012

Starting with ES 2.0, the elasticsearch process only binds to localhost, which explains why you can query ES from inside but not from the outside.

You need to change the following setting in your elasticsearch.yml configuration file:

network.host: 0.0.0.0

I had the same case. Looking in the log

tail -f /var/log/elasticsearch/NODE.log

I saw this:

 [NODE_NAME] publish_address {10.XXX.XXX.XXX:9300}, bound_addresses {10.XXX.XXX.XXX:9300}
 [NODE_NAME] bound or publishing to a non-loopback address, enforcing bootstrap checks
 [NODE_NAME] node validation exception
 [1] bootstrap checks failed
 [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
 [NODE_NAME] stopping ...
 [NODE_NAME] stopped

Solution:

Modify the archive /etc/elasticsearch/elasticsearch.yml in the line discorvery seed with this:

discovery.seed_hosts: ["127.0.0.1", "[::1]"]

Done.


I would suggest to set the network.host to special values

eg.

network.host: [_local_, _site_]

This works for me.