# Cluster Docker "not enough master nodes discovered during pinging"

**URL:** https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955
**Category:** Elasticsearch
**Tags:** docker
**Created:** [November 8, 2018, 8:31pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955 "2018-11-08T20:31:16Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 8, 2018, 8:31pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/1 "2018-11-08T20:31:17Z")

</div>

I'm trying up 1 cluster of elastic (with 3 nodes) in docker on 3 hosts differents, I up 2 nodes and return the error when i access IP:9200/\_cluster/health?pretty :  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "master\_not\_discovered\_exception",  
"reason" : null  
}  
],  
"type" : "master\_not\_discovered\_exception",  
"reason" : null  
},  
"status" : 503  
}

and in logs apeears this error:

> 2018-11-08T20:08:33,355][WARN][o.e.d.z.ZenDiscovery] [es-node1] not enough master nodes discovered during pinging (found [[Candidate{node={es-node1}{PDAnZSBdQl2zoRdtrcRf5Q}{cWDrFb-0RTWeam1Ld\_3yMw}{localhost}{127.0.0.1:9300}{ml.machine\_memory=4294967296, xpack.installed=true, ml.max\_open\_jobs=20, ml.enabled=true}, clusterStateVersion=-1}]], but needed [2]), pinging again

My elasticsearch.yml node1 (10.10.13.6)

```
cluster.name: "docker-cluster"
node.name: "es-node1"
node.master: true
node.data: true
network.host: 10.10.13.6 
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.10.13.6", "10.10.13.7", "10.10.13.8"]
network.publish_host: 10.10.13.6
discovery.zen.minimum_master_nodes: 2 

```

My elasticsearch.yml node2 (10.10.13.7)

```
cluster.name: "docker-cluster"
node.name: "es-node2"
node.master: true
node.data: true
network.host: 10.10.13.7 
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.10.13.6", "10.10.13.7", "10.10.13.8"]
network.publish_host: 10.10.13.6
discovery.zen.minimum_master_nodes: 2 

```

I need help, tks.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 8, 2018, 8:37pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/2 "2018-11-08T20:37:06Z")

</div>

Should `network.publish_host` not be `10.10.13.7` for node 2?

---

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 8, 2018, 10:00pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/3 "2018-11-08T22:00:07Z")

</div>

I did, but the error continues

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 8, 2018, 10:04pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/4 "2018-11-08T22:04:01Z")

</div>

> [@mcosta29](#):
>
> 127.0.0.1:9300

Why is there a reference to localhost in your log file?

---

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 9, 2018, 11:55am UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/5 "2018-11-09T11:55:50Z")

</div>

I think it's because of my docker-compose.yml:

version: '2'  
services:  
elasticsearch:  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.4.2](http://docker.elastic.co/elasticsearch/elasticsearch:6.4.2)  
container\_name: elasticsearch  
restart: always  
volumes:  
- es\_data:/usr/share/elasticsearch/data  
- es\_bin:/usr/share/elasticsearch/bin  
- es\_config:/usr/share/elasticsearch/config  
ports:  
- 9200:9200  
- 9300:9300  
environment:  
- http.host= **0.0.0.0**  
- transport.host= **localhost**  
# - network.host=10.10.13.6  
- xpack.security.enabled=false  
- "ES\_JAVA\_OPTS=-Xms2048m -Xmx3072m"  
mem\_limit: 4096m

kibana:  
image: [docker.elastic.co/kibana/kibana:6.4.2](http://docker.elastic.co/kibana/kibana:6.4.2)  
restart: always  
container\_name: kibana  
links:  
- elasticsearch  
environment:  
- SERVER\_NAME=Kibana  
- ELASTICSEARCH\_URL=http://elasticsearch:9200  
ports:  
- "5601:5601"  
volumes:  
- kibana\_data:/usr/share/kibana  
mem\_limit: 2048m

volumes:  
mongo\_data:  
driver: local  
es\_data:  
driver: local  
es\_bin:  
driver: local  
es\_config:  
driver: local  
graylog\_data:  
driver: local  
kibana\_data:  
driver: local

i tried change localhost and 0.0.0.0 for IP but when made, the compose not up, the container started and after some seconds is stoped

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 9, 2018, 11:59am UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/6 "2018-11-09T11:59:09Z")

</div>

> [@mcosta29](#):
>
> - transport.host= **localhost**

Well, `transport.host` can not be `localhost` as that is what Elasticsearch uses to communicate internally. Change this to `0.0.0.0` as well and see if that makes a difference.

---

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 9, 2018, 12:16pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/7 "2018-11-09T12:16:27Z")

</div>

return this error in logs:

```
2018-11-09T12:14:23,974][INFO][o.e.t.TransportService] [es-node1] publish_address {172.18.0.3:9300}, bound_addresses {0.0.0.0:9300}
[2018-11-09T12:14:24,017][INFO][o.e.b.BootstrapChecks] [es-node1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2018-11-09T12:14:24,079][INFO][o.e.n.Node] [es-node1] stopping ...
[2018-11-09T12:14:24,121][INFO][o.e.n.Node] [es-node1] stopped
[2018-11-09T12:14:24,126][INFO][o.e.n.Node] [es-node1] closing ...
[2018-11-09T12:14:24,197][INFO][o.e.n.Node] [es-node1] closed
[2018-11-09T12:14:24,205][INFO][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
```

---

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 9, 2018, 4:19pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/8 "2018-11-09T16:19:16Z")

</div>

Christian, do you know this error ?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 9, 2018, 4:28pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/9 "2018-11-09T16:28:09Z")

</div>

Yes, it is one of the bootstrap checks and is [covered here](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/_maximum_map_count_check.html).

---

<div class="post-metadata">

### Author: ![mcosta29](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcosta29](https://discuss.elastic.co/u/mcosta29)
#### Post date: [November 9, 2018, 5:21pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/10 "2018-11-09T17:21:02Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> Yes, it is one of the bootstrap checks and is [covered here](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/_maximum_map_count_check.html).

Tks Christian the cluster is up

---

<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: [December 7, 2018, 5:21pm UTC](https://discuss.elastic.co/t/cluster-docker-not-enough-master-nodes-discovered-during-pinging/155955/11 "2018-12-07T17:21:20Z")

</div>

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