Search code examples
network-programmingelasticsearch

binding to specific ip address in elasticsearch 5


I have tried several combinations of proposed configurations I found either in the official documentation or the internet. However, I'm keep getting the same error shown below regardless of the configuration.

[2016-12-14T13:47:37,706][INFO ][o.e.p.PluginsService     ] [vc6lzXh] no plugins loaded
[2016-12-14T13:47:43,048][INFO ][o.e.n.Node               ] initialized
[2016-12-14T13:47:43,054][INFO ][o.e.n.Node               ] [vc6lzXh] starting ...
[2016-12-14T13:47:43,495][INFO ][o.e.t.TransportService   ] [vc6lzXh] publish_address {192.168.34.84:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2016-12-14T13:47:43,514][INFO ][o.e.b.BootstrapCheck     ] [vc6lzXh] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2016-12-14T13:47:43,538][INFO ][o.e.n.Node               ] [vc6lzXh] stopping ...
[2016-12-14T13:47:43,680][INFO ][o.e.n.Node               ] [vc6lzXh] stopped
[2016-12-14T13:47:43,681][INFO ][o.e.n.Node               ] [vc6lzXh] closing ...
[2016-12-14T13:47:43,700][INFO ][o.e.n.Node               ] [vc6lzXh] closed

Elasticsearch v5.1.1 is installed in a virtual machine which has a bridged ip address, 192.168.34.84

The configurations I've tried are as follows: 1.

network.host, 192.168.34.84

2.

network.host: 192.168.34.84
network.public_host: 192.168.34.84

3.

network.bind_host: 192.168.34.84

4.

network.bind_host: 0.0.0.0
network.publish_host: 192.168.34.84

None of these did work for me. I guess there are significant changes in v5.11. any help?


Solution

  • According to the the Bootstrap Checks, make sure you've got the important settings set in your machine.

    Setting your network.host to something like this, where network.bind_host and network.public_host would pick up the value of network.host by default:

    network.host: 192.168.34.84
    

    Try having only the above property set , without the others. Maybe you could have a look at these for more:

    EDIT:

    So according to your logs, you have to increase vm.max_map_count to 262144 where you set this, as a root user in your machine:

    sysctl -w vm.max_map_count=262144
    

    Have a look at the details here about the VM.

    Hope it helps!