# Not enough master nodes discovered during pinging (found \[\[\]\], but needed \[2\]), pinging again

**URL:** <https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575>\
**Category:** Elasticsearch\
**Created:** [October 1, 2018, 1:49pm UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575 "2018-10-01T13:49:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [October 1, 2018, 1:49pm UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575/1 "2018-10-01T13:49:45Z")

</div>

Hi,

I have a 4 node cluster. 3 nodes are running on Red Hat Enterprise Linux Server. 1 node is on Windows Server 2008 R2. Configurations are as follows:

> node4 [coordinating node]

cluster.name: appmon  
node.name: node4  
network.host: 10.74.160.99  
http.port: 9204  
node.data: false  
node.master: false  
node.ingest: false  
discovery.zen.ping.unicast.hosts: ["10.74.161.100:9201","10.74.161.100:9202","10.74.161.100:9203","10.74.160.99:9204"]  
discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping\_timeout: 60s

> node1 [master+data+ingest]

cluster.name: appmon  
node.name: node1  
network.host: 10.74.161.100  
http.port: 9201  
node.data: true  
node.master: true  
node.ingest: true  
discovery.zen.ping.unicast.hosts: ["10.74.161.100:9201","10.74.161.100:9202","10.74.161.100:9203","10.74.160.99:9204"]  
discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping\_timeout: 60s

> node2 [master+data+ingest]

cluster.name: appmon  
node.name: node2  
network.host: 10.74.161.100  
http.port: 9202  
node.data: true  
node.master: true  
node.ingest: true  
discovery.zen.ping.unicast.hosts: ["10.74.161.100:9201","10.74.161.100:9202","10.74.161.100:9203","10.74.160.99:9204"]  
discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping\_timeout: 60s

> node3 [master+data+ingest]

cluster.name: appmon  
node.name: node3  
network.host: 10.74.161.100  
http.port: 9203  
node.data: true  
node.master: true  
node.ingest: true  
discovery.zen.ping.unicast.hosts: ["10.74.161.100:9201","10.74.161.100:9202","10.74.161.100:9203","10.74.160.99:9204"]  
discovery.zen.minimum\_master\_nodes: 2  
discovery.zen.ping\_timeout: 60s

I am starting nodes in the order: node1, node2, node3 and then node4.  
I am getting json response like this for all 4 nodes:  
{  
"name" : "node1",  
"cluster\_name" : "appmon",  
"cluster\_uuid" : "_na_",  
"version" : {  
"number" : "6.4.0",  
"build\_flavor" : "default",  
"build\_type" : "tar",  
"build\_hash" : "595516e",  
"build\_date" : "2018-08-17T23:18:47.308994Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.4.0",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}  
In the logs of node4, I am getting this exception:  
not enough master nodes discovered during pinging (found [], but needed [2]), pinging again

I increased the discovery.zen.ping\_timeout to 60s. Even then I am getting above exception.

---

<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:** [October 1, 2018, 2:04pm UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575/2 "2018-10-01T14:04:29Z")

</div>

What is the exact version of Java you are running on all the nodes? Have you verified that all the nodes can reach eachother?

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 1, 2018, 2:24pm UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575/3 "2018-10-01T14:24:23Z")

</div>

I notice that you've used the **http.port** values after each host in the zen discovery hosts settings on your nodes, such as this one (from node4):

> [@aviral\_srivastava](#):
>
> discovery.zen.ping.unicast.hosts: ["10.74.161.100:9201","10.74.161.100:9202","10.74.161.100:9203","10.74.160.99: **9204**"]

This wont't work because Elasticsearch uses TCP for the master discovery phase, not HTTP, so you need to specify the TCP port. If you've specified a TCP port in the **transport.tcp.port** field in elasticsearch.yml you need to use this value, if not use the default which I believe is 9300.

---

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [October 5, 2018, 6:44am UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575/5 "2018-10-05T06:44:26Z")

</div>

Thanks,  
I changed this configuration in elasticsearch.yml  
discovery.zen.ping.unicast.hosts: ["10.74.161.100:9303", "10.74.161.100:9304", "10.74.161.100:9305", "10.74.160.99"]  
Now its working fine.

---

<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:** [November 2, 2018, 6:44am UTC](https://discuss.elastic.co/t/not-enough-master-nodes-discovered-during-pinging-found-but-needed-2-pinging-again/150575/6 "2018-11-02T06:44:30Z")

</div>

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