I am trying to setup an 3-node ES cluster in GCP over 3 VM instances. I have created the 3 VMs and am trying to setup ES in each using docker-compose referring to the original ES documentation. Yet, I am unable to form cluster. The error I get is :
elasticsearch01 | {"type": "server", "timestamp": "2020-02-07T08:22:38,765Z", "level": "DEBUG", "component": "o.e.a.s.m.TransportMasterNodeAction", "cluster.name": "elk-docker-cluster", "node.name": "elasticsearch01", "message": "no known master node, scheduling a retry" }
elasticsearch01 | {"type": "server", "timestamp": "2020-02-07T08:22:38,766Z", "level": "DEBUG", "component": "o.e.a.s.m.TransportMasterNodeAction", "cluster.name": "elk-docker-cluster", "node.name": "elasticsearch01", "message": "no known master node, scheduling a retry" }
elasticsearch01 | {"type": "server", "timestamp": "2020-02-07T08:22:40,265Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "elk-docker-cluster", "node.name": "elasticsearch01", "message": "master not discovered or elected yet, an election requires at least 2 nodes with ids from [WGoBC5OOTZa69SmGH7KRwg, P11WUJLoSHqc22Uy2MIhVA, E0N7QP2QRRWFwggnJqz1HA], have discovered [{elasticsearch01}{E0N7QP2QRRWFwggnJqz1HA}{H4BFylE-TlWSdNE1oeCz7A}{172.19.0.2}{172.19.0.2:9300}{dilm}{ml.machine_memory=33742512128, xpack.installed=true, ml.max_open_jobs=20}] which is not a quorum; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, 10.203.116.114:9300, 10.203.116.15:9300, 10.203.116.108:9300, 10.203.116.16:9300, 10.203.119.249:9300, 10.203.116.8:9300, 10.203.116.38:9300, 10.203.116.126:9300, 10.203.116.35:9300, 10.203.116.59:9300, 10.203.116.31:9300, 10.203.116.54:9300, 10.203.116.50:9300, 10.203.116.52:9300, 10.203.116.51:9300, 10.203.116.53:9300, 10.203.116.55:9300, 10.203.116.56:9300, 10.203.116.37:9300, 10.203.116.34:9300, 10.203.116.61:9300, 10.203.116.42:9300] from hosts providers and [{elasticsearch01}{E0N7QP2QRRWFwggnJqz1HA}{H4BFylE-TlWSdNE1oeCz7A}{172.19.0.2}{172.19.0.2:9300}{dilm}{ml.machine_memory=33742512128, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 2, last-accepted version 37 in term 2" }
My docker-compose.yaml
file is :
version: '2.2'
services:
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.2
container_name: es03
command: >
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q discovery-gce
|| ./bin/elasticsearch-plugin install --batch discovery-gce;
/usr/local/bin/docker-entrypoint.sh"
environment:
- node.name=es03
- cluster.name=elk-docker-cluster
- cluster.initial_master_nodes=10.203.116.108,10.203.116.114,10.203.116.15
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms16g -Xmx16g"
- cloud.gce.project_id=mobile-ci-infra
- cloud.gce.zone=asia-east1-a
- discovery.seed_providers=gce
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
networks:
- elastic
volumes:
data01:
driver: local
networks:
elastic:
driver: bridge
/>
The response for API call http://10.203.116.108:9200/
is as follows :
{
"name" : "elasticsearch03",
"cluster_name" : "elk-docker-cluster",
"cluster_uuid" : "_na_",
"version" : {
"number" : "7.5.2",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "8bec50e1e0ad29dad5653712cf3bb580cd1afcdf",
"build_date" : "2020-01-15T12:11:52.313576Z",
"build_snapshot" : false,
"lucene_version" : "8.3.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
The cluster_uuid
is _na_
for all 3 nodes.
Please help, I am at a loss as to what am I doing wrong.