Node joining docker

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

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

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 .

  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.

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

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

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