ES 2.1 only bind on localhost


I have my ES 2.1 only listen on localhost however in my configuration i set network.bind_host: ["_em1:ipv4_", "_lo:ipv4_", "_docker0:ipv4_"] and network.publish_host: _em1:ipv4_ any idea ?

I'd use _em1:ipv4_

Would that work?

The setting is a simple setting to automatically set both network.bind_host and network.publish_host to the same host value.

If i use em1:ipv4 , my ES 2.1 only listen on em1 iface and i need listening on em1 ,lo and docker0 interfaces

1 Like

In emergency case i use and my cluster is now listening on all interface but its not a good option

I looked at the code and you should be able to set:

network.bind_host: ["_em1:ipv4_", "_lo:ipv4_", "_docker0:ipv4_"]
network.publish_host: _em1:ipv4_

Can you change the log level to debug and see what is happening?
You should see some lines like:

binding server bootstrap to: XXXXX

I setup a VM with ES 2.1


network.bind_host: ["_eth0:ipv4_", "_lo:ipv4_"]
network.publish_host: _eth0:ipv4_
[2015-12-09 15:02:31,319][DEBUG][http.netty               ] [Clea] Bound http to address {}
[2015-12-09 15:02:31,321][DEBUG][http.netty               ] [Clea] Bound http to address {[::1]:9200}
[2015-12-09 15:02:31,322][INFO ][http                     ] [Clea] publish_address {}, bound_addresses {}, {[::1]:9200}

Publish address looks ok but bound addresse failed

Just to make sure. Can you try:

network.bind_host: "NONEXSISTINGADDRESS"

And then:


Got it. Actually I tried it and when you set it as an array it's ignored!

Opening an issue... See

So I looked at the wrong code... I was looking at 2.x branch but things changed!

Binding to multiple addresses is only supported in coming 2.2 version:

1 Like

I've had this issue on Windows Server 2012 R2 and I have workarounded it by setting all
3 parameters to the current machine IP address:

But that disables localhost connections.

To allow localhost on some nodes I've set:


This work for me... But is this correct?