# Sub : Data node unable to discover master node in another machine

**URL:** <https://discuss.elastic.co/t/sub-data-node-unable-to-discover-master-node-in-another-machine/203459>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [October 14, 2019, 1:06pm UTC](https://discuss.elastic.co/t/sub-data-node-unable-to-discover-master-node-in-another-machine/203459 "2019-10-14T13:06:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![R.mohan\_raj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/r.mohan_raj/32/55774_2.png) [@R.mohan\_raj](https://discuss.elastic.co/u/R.mohan_raj)\
**Post date:** [October 14, 2019, 1:06pm UTC](https://discuss.elastic.co/t/sub-data-node-unable-to-discover-master-node-in-another-machine/203459/1 "2019-10-14T13:06:49Z")

</div>

```
                                     I am trying to deploy a 2 node(1 master,1 data) elasticsearch cluster using docker and was able to start the first node as master without any issues but when I try to start the second elasticsearch docker container it can't discover the master. Both machines are in the same network, able to ping to the master es port from data machine terminal.

```

Elastic search version : 5.6.2

Docker version : 1.13.1

**Getting this startup log for data node :**

[2019-10-14T10:50:44,194][WARN][o.e.b.JNANatives] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory  
[2019-10-14T10:50:44,196][WARN][o.e.b.JNANatives] This can result in part of the JVM being swapped out.  
[2019-10-14T10:50:44,196][WARN][o.e.b.JNANatives] Increase RLIMIT\_MEMLOCK, soft limit: 65536, hard limit: 65536  
[2019-10-14T10:50:44,197][WARN][o.e.b.JNANatives] These can be adjusted by modifying /etc/security/limits.conf, for example:  
# allow user 'elasticsearch' mlockall  
elasticsearch soft memlock unlimited  
elasticsearch hard memlock unlimited  
[2019-10-14T10:50:44,197][WARN][o.e.b.JNANatives] If you are logged in interactively, you will have to re-login for the new limits to take effect.  
[2019-10-14T10:50:44,311][INFO][o.e.n.Node] [data-1] initializing ...  
[2019-10-14T10:50:44,392][INFO][o.e.e.NodeEnvironment] [data-1] using [1] data paths, mounts [[/ (rootfs)]], net usable\_space [7.4gb], net total\_space [9.6gb], spins? [unknown], types [rootfs]  
[2019-10-14T10:50:44,393][INFO][o.e.e.NodeEnvironment] [data-1] heap size [1.9gb], compressed ordinary object pointers [true]  
[2019-10-14T10:50:44,394][INFO][o.e.n.Node] [data-1] node name [data-1], node ID [3LHyDPPtRrWQz8-CaSMztA]  
[2019-10-14T10:50:44,394][INFO][o.e.n.Node] [data-1] version[5.6.2], pid[1], build[57e20f3/2017-09-23T13:16:45.703Z], OS[Linux/3.10.0-957.21.3.el7.x86\_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0\_141/25.141-b16]  
[2019-10-14T10:50:44,395][INFO][o.e.n.Node] [data-1] JVM arguments [-Xms2g, -Xmx2g, -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.cgroups.hierarchy.override=/, -Des.path.home=/usr/share/elasticsearch]  
[2019-10-14T10:50:46,103][INFO][o.e.p.PluginsService] [data-1] loaded module [aggs-matrix-stats]  
[2019-10-14T10:50:46,103][INFO][o.e.p.PluginsService] [data-1] loaded module [ingest-common]  
[2019-10-14T10:50:46,103][INFO][o.e.p.PluginsService] [data-1] loaded module [lang-expression]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [lang-groovy]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [lang-mustache]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [lang-painless]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [parent-join]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [percolator]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [reindex]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [transport-netty3]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded module [transport-netty4]  
[2019-10-14T10:50:46,104][INFO][o.e.p.PluginsService] [data-1] loaded plugin [ingest-geoip]  
[2019-10-14T10:50:46,105][INFO][o.e.p.PluginsService] [data-1] loaded plugin [ingest-user-agent]  
[2019-10-14T10:50:46,105][INFO][o.e.p.PluginsService] [data-1] loaded plugin [x-pack]  
[2019-10-14T10:50:48,321][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/133] [Main.cc@128] controller (64 bit): Version 5.6.2 (Build 228329870d1c63) Copyright (c) 2017 Elasticsearch BV  
[2019-10-14T10:50:48,365][INFO][o.e.d.DiscoveryModule] [data-1] using discovery type [zen]  
[2019-10-14T10:50:49,227][INFO][o.e.n.Node] [data-1] initialized  
[2019-10-14T10:50:49,227][INFO][o.e.n.Node] [data-1] starting ...  
[2019-10-14T10:50:49,517][INFO][o.e.t.TransportService] [data-1] publish\_address {127.0.0.1:9301}, bound\_addresses {127.0.0.1:9301}  
[2019-10-14T10:50:49,529][WARN][o.e.b.BootstrapChecks] [data-1] memory locking requested for elasticsearch process but memory is not locked  
[2019-10-14T10:50:52,566][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again  
[2019-10-14T10:50:55,568][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again  
[2019-10-14T10:50:58,570][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again  
[2019-10-14T10:51:19,554][WARN][o.e.n.Node] [data-1] timed out while waiting for initial discovery state - timeout: 30s  
[2019-10-14T10:51:19,571][INFO][o.e.h.n.Netty4HttpServerTransport] [data-1] publish\_address {172.20.24.99:9200}, bound\_addresses {172.21.0.2:9200}  
[2019-10-14T10:51:19,572][INFO][o.e.n.Node] [data-1] started  
[2019-10-14T10:51:19,585][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again  
[2019-10-14T10:51:22,586][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again  
[2019-10-14T10:51:25,588][WARN][o.e.d.z.ZenDiscovery] [data-1] not enough master nodes discovered during pinging (found [], but needed [-1]), pinging again

**Data node netsats -lnp**

 ![03%20PM](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2bbabc2ffeeca4eb64adb3aac9682075b900ec08.png)

**Master Node config-file**

cluster.name: mynewclustername  
node.name: master  
bootstrap.memory\_lock: true  
network.host: _site_  
http.port: 9200  
network.publish\_host: 172.20.7.29  
discovery.zen.ping.unicast.hosts: ["172.20.7.29"]  
xpack.security.enabled: false  
node.master: true  
node.data: false

**Data Node config-file**

cluster.name: mynewclustername  
node.name: data-1  
bootstrap.memory\_lock: true  
network.host: _site_  
http.port: 9200  
network.publish\_host: 172.20.24.99  
transport.host: localhost  
discovery.zen.ping.unicast.hosts: ["172.20.7.29"]  
xpack.security.enabled: false  
node.master: false  
node.data: true

---

<div class="post-metadata">

**Author:** ![R.mohan\_raj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/r.mohan_raj/32/55774_2.png) [@R.mohan\_raj](https://discuss.elastic.co/u/R.mohan_raj)\
**Post date:** [October 17, 2019, 12:08pm UTC](https://discuss.elastic.co/t/sub-data-node-unable-to-discover-master-node-in-another-machine/203459/3 "2019-10-17T12:08:43Z")

</div>

I added quote text so i expanded  
I am trying to deploy a 2 node(1 master,1 data) elasticsearch cluster using docker and was able to start the first node as master without any issues but when I try to start the second elasticsearch docker container it can't discover the master. Both machines are in the same network, able to ping to the master es port from data machine terminal.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 14, 2019, 12:08pm UTC](https://discuss.elastic.co/t/sub-data-node-unable-to-discover-master-node-in-another-machine/203459/4 "2019-11-14T12:08:43Z")

</div>

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