Elasticsearch in Docker Master Discovery

Hi,
I'm testing running elasticsearch in a docker container. I want to see it join an existing, non-docker, cluster. The service starts but fails to discover master nodes. Can someone help me understand the issue here?

I'm launching elasticsearch like this:

/usr/bin/docker run \
-p 9200:9200 \
-p 9300:9300 \
-a STDOUT \
-a STDERR \
--name elasticsearch_lab \
--mount type=bind,source=/opt/elasticsearch,target=${ES_HOME}/data \
--mount type=bind,source=/var/log/elasticsearch,target=${ES_HOME}/logs \
--mount type=bind,source=/etc/elasticsearch,target=${ES_HOME}/config \
--mount type=bind,source=/etc/default,target=/etc/default \
--ulimit nofile=65536:65536 \
--ulimit memlock=-1:-1 \
--network host \
$DOCKER_IMAGE \
--quiet \
-Edefault.path.logs=${ES_HOME}/logs \
-Edefault.path.data=${ES_HOME}/data \
-Edefault.path.conf=${ES_HOME}/config

The elasticsearch log looks like this:

[2018-07-19T08:02:20,192][INFO ][o.e.n.Node ] [test_node1] version[5.6.10], pid[1], build[b727a60/2018-06-06T15:48:34.860Z], OS[Linux/4.4.0-71-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_171/25.171-b11]
[2018-07-19T08:02:20,192][INFO ][o.e.n.Node ] [test_node1] JVM arguments [-Xms1024m, -Xmx1024m, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch]
[2018-07-19T08:02:23,051][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [aggs-matrix-stats]
[2018-07-19T08:02:23,051][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [ingest-common]
[2018-07-19T08:02:23,051][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [lang-expression]
[2018-07-19T08:02:23,051][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [lang-groovy]
[2018-07-19T08:02:23,051][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [lang-mustache]
[2018-07-19T08:02:23,052][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [lang-painless]
[2018-07-19T08:02:23,052][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [parent-join]
[2018-07-19T08:02:23,052][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [percolator]
[2018-07-19T08:02:23,052][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [reindex]
[2018-07-19T08:02:23,053][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [transport-netty3]
[2018-07-19T08:02:23,053][INFO ][o.e.p.PluginsService ] [test_node1] loaded module [transport-netty4]
[2018-07-19T08:02:23,058][INFO ][o.e.p.PluginsService ] [test_node1] loaded plugin [discovery-ec2]
[2018-07-19T08:02:23,058][INFO ][o.e.p.PluginsService ] [test_node1] loaded plugin [mapper-size]
[2018-07-19T08:02:23,058][INFO ][o.e.p.PluginsService ] [test_node1] loaded plugin [repository-s3]
[2018-07-19T08:02:25,951][INFO ][o.e.d.DiscoveryModule ] [test_node1] using discovery type [zen]
[2018-07-19T08:02:27,313][INFO ][o.e.n.Node ] [test_node1] initialized
[2018-07-19T08:02:27,314][INFO ][o.e.n.Node ] [test_node1] starting ...
[2018-07-19T08:02:27,609][INFO ][o.e.t.TransportService ] [test_node1] publish_address {<ip_addr>:9300}, bound_addresses {<ip_addr>:9300}
[2018-07-19T08:02:27,629][INFO ][o.e.b.BootstrapChecks ] [test_node1] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-07-19T08:02:30,719][WARN ][o.e.d.z.ZenDiscovery ] [test_node1] not enough master nodes discovered during pinging (found [], but needed [2]), pinging again

Regards,
D

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