# Node joining docker

**URL:** <https://discuss.elastic.co/t/node-joining-docker/257742>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [December 5, 2020, 5:22pm UTC](https://discuss.elastic.co/t/node-joining-docker/257742 "2020-12-05T17:22:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bonzo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bonzo/32/77793_2.png) [@Bonzo](https://discuss.elastic.co/u/Bonzo)\
**Post date:** [December 5, 2020, 5:22pm UTC](https://discuss.elastic.co/t/node-joining-docker/257742/1 "2020-12-05T17:22:20Z")

</div>

Hi  
I have problem joining a data node to the cluster.  
I m using docker in 2 separate machines. Both machines can talk to each other.  
My first docker:  
-- Master  
docker run -d --name elastic   
-p 9200:9200 -p 9300:9300   
-e "cluster.name=my-cluster-test"   
-e"node.name=my-name"   
-e "node.master=true"   
-e "node.data=false"   
-e"network.host=0.0.0.0"   
-e"network.publish\_host=1.2.3.202"   
-e"cluster.initial\_master\_nodes=12.3.202"   
[docker.elastic.co/elasticsearch/elasticsearch:7.9.0](http://docker.elastic.co/elasticsearch/elasticsearch:7.9.0)

My second:  
-- Data working  
docker run -d --name elastic   
-p 9200:9200 -p 9300:9300   
-e "cluster.name=my-cluster-test"   
-e "node.master=false"   
-e "node.data=true"   
-e "node.name=my-name-2"   
-e "network.host=0.0.0.0"   
-e "network.publish\_host=1.2.3.203"   
-e "discovery.seed\_hosts=1.2.3.202"   
[docker.elastic.co/elasticsearch/elasticsearch:7.9.0](http://docker.elastic.co/elasticsearch/elasticsearch:7.9.0)

The log is telling:  
...  
"node.name": "my-name-2", "message": "master not discovered yet: have discovered [{my-name-2}{Je7lyXm9QI-139Sq-LrrFA}{CEjg2sdCTMuOzDrQf7bqAQ}{1.2.3.203}{1.2.3.203:9300}{dilrt}{ml.machine\_memory=16617246720, xpack.installed=true, transform.node=true, ml.max\_open\_jobs=20}]; discovery will continue using [1.2.3.202:9300] from hosts providers and from last-known cluster state; node term 0, last-accepted version 0 in term 0" }

PS: From the data node (inside the container) I can ping the master .

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [December 6, 2020, 4:36am UTC](https://discuss.elastic.co/t/node-joining-docker/257742/2 "2020-12-06T04:36:57Z")

</div>

1. Please format your code for better readability.
2. `-e"cluster.initial_master_nodes=12.3.202"` seems to miss a dot between 1 and 2.
3. I'm not sure that is the correct `node.name` for your scenario, see the documentation on [cluster.initial\_master\_nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#initial_master_nodes).

---

<div class="post-metadata">

**Author:** ![Bonzo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bonzo/32/77793_2.png) [@Bonzo](https://discuss.elastic.co/u/Bonzo)\
**Post date:** [December 6, 2020, 3:05pm UTC](https://discuss.elastic.co/t/node-joining-docker/257742/3 "2020-12-06T15:05:23Z")

</div>

Ah, sorry about that. The missing dot is just typos.  
I also read the documentation (of course).

---

<div class="post-metadata">

**Author:** ![Bonzo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bonzo/32/77793_2.png) [@Bonzo](https://discuss.elastic.co/u/Bonzo)\
**Post date:** [December 12, 2020, 3:56pm UTC](https://discuss.elastic.co/t/node-joining-docker/257742/4 "2020-12-12T15:56:51Z")

</div>

The problem was a local firewall. By running:

sudo firewall-cmd --zone=public --add-masquerade --permanent sudo firewall-cmd --reload  
$ sudo systemctl restart docker

Then problem is gone

---

<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:** [January 9, 2021, 3:57pm UTC](https://discuss.elastic.co/t/node-joining-docker/257742/5 "2021-01-09T15:57:19Z")

</div>

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