How to bind Elasticsearch 2.0 on both Loopback and Non-Loopback interfaces?

Funbit picture Funbit · Oct 29, 2015 · Viewed 18k times · Source

Starting from version 2.0 Elasticsearch binds only on the loopback interface by default (_local_ in terms of configuration).

The documentation says that there is a way to switch to another network, for example, _non_loopback_ binds to the first non-loopback interface. It works fine.

But I cannot figure out how do I combine these settings so that Elasticsearch binds on both loopback and non-loopback interfaces simultaneously?

PS. My reason is that I use Logstash on each Elasticsearch instance that connects to it via localhost, but I also want other Elasticsearch instances to see each other to form the cluster...

Answer

Andrei Stefan picture Andrei Stefan · Oct 30, 2015

For 2.0 you would need to use

network.bind_host: 0