# Elasticsearch: Not enough master nodes discovered during pinging

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546>\
**Category:** Elasticsearch\
**Created:** [February 6, 2018, 2:32am UTC](https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546 "2018-02-06T02:32:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiteshs](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@hiteshs](https://discuss.elastic.co/u/hiteshs)\
**Post date:** [February 6, 2018, 2:32am UTC](https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546/1 "2018-02-06T02:32:54Z")

</div>

I'm trying to setup a cluster with 4 Master nodes. After restarting the service, I've been getting the following error:

`[2018-02-05T21:29:41,040][WARN][o.e.d.z.ZenDiscovery] [Elasticsearch-Master] not enough master nodes discovered during pinging (found [[Candidate{node={Elasticsearch-Master}{F_D4d7yvQJiQ0mXdkE2n_Q}{4hYjYChtS4aOVJXEZ7ue_A}, clusterStateVersion=-1}]], but needed [3]), pinging again`

1st node: Master only  
2nd node: Master + Data  
3rd node: Master + Data  
4th node: Master + Data

1st node config:

```
cluster.name: es-prod
node.name: Elasticsearch-Master
node.master: true
node.data: false

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: <private-ip_1st-node>

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

```

2nd node config:

```
cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

```

3rd node config:

```
cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true

```

4th node config:

```
cluster.name: es-prod
node.name: ${HOSTNAME}
node.master: true
node.data: true

path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch

bootstrap.memory_lock: true

network.host: 127.0.0.1

network.publish_host: ip-<private-ip_1st-node>.compute.internal

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

discovery.zen.minimum_master_nodes: 3

gateway.recover_after_master_nodes: 3
gateway.recover_after_data_nodes: 3

action.destructive_requires_name: true
```

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [February 6, 2018, 3:02am UTC](https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546/2 "2018-02-06T03:02:07Z")

</div>

You bound your nodes to localhost yet specified host names that presumably resolve to non-localhost addresses. These nodes will not be able to ping each other until you bind them to sockets reachable from each other.

---

<div class="post-metadata">

**Author:** ![hiteshs](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@hiteshs](https://discuss.elastic.co/u/hiteshs)\
**Post date:** [February 6, 2018, 3:19am UTC](https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546/3 "2018-02-06T03:19:52Z")

</div>

Hey Jason,

Thank you so much for your suggestion. I was able to resolve this issue!!

---

<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:** [March 6, 2018, 3:20am UTC](https://discuss.elastic.co/t/elasticsearch-not-enough-master-nodes-discovered-during-pinging/118546/4 "2018-03-06T03:20:02Z")

</div>

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