ES 2.0 network config options

Hello,
I just upgraded ES to the latest version using the debian package.

I tried to run ES 2.0 with the new elasticsearch.yml file, containing less options than the config file of ES 1.7.3. I set the network.bind_host: _eth0_ to listen for HTTP on eth0 and network.publish_host: _eth1_ for communication between nodes. But I can't get a different IP for listening on each port (9200 and 9300). Only one IP is listening on both ports.

I also made many tries with the network.host option.

In a nutshell, the config file from the previous version (ES 1.7.3) isn't compatible.
Am I missing something ?

(This doc was used https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html)

If you want to enable the behavior that you would expect with the 1.x version of ES then you need to set network.host: 0.0.0.0

At which point ES will be available at any of the IP addresses including loopback and public.

I don't fully understand all the bind and publish host configuration, so until then I've just bound it to all available IP's this way.

You just need network.bind_host: 0. Filed issue https://github.com/elastic/docs/issues/48.

Thanks for the answers.
I had to set those two options so it could do what we needed:

network.bind_host: 0.0.0.0

network.publish_host: _eth1_

@Brian_KITHEN you should be aware that you also open the loopback device. A more safe configuration to restrict ES to a NIC would be

network.bind_host: "_eth1_" 
network.publish_host: "_eth1_"

which is (surprisingly) different from

network.host: "_eth1_" 

which also binds to 0.0.0.0

I need my nodes to listen on port 9300 with there private IP, which is on eth1.

So, ideally, I would like to have 9200 binded to eth0 (Public IP) and 9300 to eth1, without opening any loopback for both ports. I tried many times but couldn't get the perfect configuration.

May be change transport.host in that case https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_tcp_transport?q=transport hosts

And http.host with https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html

1 Like