ES 2.0 network config options

(Brian Kithen) #1

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 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

(John) #2

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

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

(John) #3

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.

(Jason Bryan) #4

You just need network.bind_host: 0. Filed issue

(Brian Kithen) #5

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


network.publish_host: _eth1_

(Jörg Prante) #6

@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 "_eth1_" 

which also binds to

(Brian Kithen) #7

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.

(David Pilato) #8

May be change in that case hosts

And with

(system) #9