Elasticsearch docker image acts differently on a different host OS

hi Elasticsearch,

I'm trying to run ES docker image docker.elastic.co/elasticsearch/elasticsearch:5.2.2 so that it binds the port 9300 on non LO interface, so that other containers can connect to that port.

My tests suggest, that depending on the host OS, the container behaves in a different way.

  • on windows host, it works fine, 9300 will be set to 0.0.0.0 by default
  • on linux host (Centos 7) it will be set to 127.0.0.1 and when I try to change that by passing env. variable transport.host: 0.0.0.0 it fails with the following log:

2017-05-11T14:40:26.292101000Z [2017-05-11T14:40:26,291][WARN ][i.n.u.i.MacAddressUtil ] Failed to find a usable hardware address from the network interfaces; using random bytes: e5:10:81:65:27:26:0c:88
2017-05-11T14:40:26.353358000Z [2017-05-11T14:40:26,348][INFO ][o.e.t.TransportService ] [Ac7UhUV] publish_address {172.17.0.2:9300}, bound_addresses {0.0.0.0:9300}
2017-05-11T14:40:26.354933000Z [2017-05-11T14:40:26,353][INFO ][o.e.b.BootstrapChecks ] [Ac7UhUV] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
2017-05-11T14:40:26.360114000Z ERROR: bootstrap checks failed
2017-05-11T14:40:26.360716000Z max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2017-05-11T14:40:26.364435000Z [2017-05-11T14:40:26,362][INFO ][o.e.n.Node ] [Ac7UhUV] stopping ...
2017-05-11T14:40:26.482141000Z [2017-05-11T14:40:26,480][INFO ][o.e.n.Node ] [Ac7UhUV] stopped
2017-05-11T14:40:26.482864000Z [2017-05-11T14:40:26,481][INFO ][o.e.n.Node ] [Ac7UhUV] closing ...
2017-05-11T14:40:26.502629000Z [2017-05-11T14:40:26,501][INFO ][o.e.n.Node ] [Ac7UhUV] closed

I'm running the container in this way:
docker run -d --name kadme_elastic -e "transport.host=0.0.0.0" docker.elastic.co/elasticsearch/elasticsearch:5.2.2

Regards
Jacek

Setting the vm.max_map_count to the advised number does not help.
The container exits after some time.

Regards
Jacek

this helped in our case -
sudo sysctl -w vm.max_map_count=262144

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.