0
votes

I am building a docker image that runs ES v7.5.1 under Windows ServerCore but that doesn't seem to work.

When I start the docker container, I have a message saying that the node couldn't join the cluster.

[o.e.c.c.ClusterFormationFailureHelper] [66EADAF2C321] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and [cluster.initial_master_nodes] is empty on this node: have discovered [{66EADAF2C321}{PLdolNAJSfC_tyPB32cLtQ}{YC0BB7okSFOBA_i9GqI6xA}{172.27.103.24}{172.27.103.24:9300}{dilm}{ml.machine_memory=1072611328, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [127.0.0.1:9300, [::1]:9300] from hosts providers and [{66EADAF2C321}{PLdolNAJSfC_tyPB32cLtQ}{YC0BB7okSFOBA_i9GqI6xA}{172.27.103.24}{172.27.103.24:9300}{dilm}{ml.machine_memory=1072611328, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

If I run ES on laptop it works without any issue (same elasticsearch.yml file).

Do you have idea on why docker is failing?

elasticsearch.yml file:

network.host: 0.0.0.0

cluster.name: elasticsearch

path.logs: L:/ path.data: D:/

discovery.seed_hosts: 127.0.0.1, [::1]

http.port: 9200

and the docker image:

docker pull mydockeruniversity/elasticsearchservercore:751-beta1-cfgchange1
1
You'd need to share your docker config and elasticsearch.yml. seems like its a docker networking issue.apt-get_install_skill
@apt-get_install_skill I updated the question with docker file & yml filehazjack

1 Answers

0
votes

The node can not connect to other nodes and form a cluster because you haven't configured them in the discovery.seed_hosts setting. Right now you tell your nodes that they should try to connect to localhost (127.0.0.1) to find the other nodes. Since you are inside a docker container, there won't be any nodes under that address.

Instead, you need to provide the hostnames or ip-addresses of the master-eligible nodes in that setting like so:

discovery.seed_hosts:
  - 192.168.1.10:9300
  - 192.168.1.11 
  - seeds.mydomain.com 

You might want to take a look at the discovery docs to get a better grasp about that topic.