# Elasticsearch nodes not being discovered in EC2 in 5.6

**URL:** <https://discuss.elastic.co/t/elasticsearch-nodes-not-being-discovered-in-ec2-in-5-6/100222>\
**Category:** Elasticsearch\
**Created:** [September 12, 2017, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes-not-being-discovered-in-ec2-in-5-6/100222 "2017-09-12T14:16:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![intrepid1](https://avatars.discourse-cdn.com/v4/letter/i/dbc845/32.png) [@intrepid1](https://discuss.elastic.co/u/intrepid1)\
**Post date:** [September 12, 2017, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes-not-being-discovered-in-ec2-in-5-6/100222/1 "2017-09-12T14:16:20Z")

</div>

I am setting up an Elasticsearch cluster in EC2 but it is failing with the crucial discovery stage. I am using packer to build the instances and this works. However when I start up a master I receive the message

"[2017-09-12T13:26:35,595][WARN][o.e.d.z.ZenDiscovery] [cF8JVs0] not enough master nodes discovered during pinging (found [[Candidate{node={cF8JVs0}{cF8JVs0iQx2BtY\_ABnaaIg}{8Z1GmqjZQ0GJPwOSfSeCIQ}{10.9.32.188}{10.9.32.188:9300}{aws\_availability\_zone=eu-west-1b}, clusterStateVersion=-1}]], but needed [3]), pinging again"

even when three masters are up.

Our IAM policy is

{  
"Statement": [  
{  
"Action": [  
"ec2:DescribeInstances"  
],  
"Effect": "Allow",  
"Resource": [  
"\*"  
]  
}  
],  
"Version": "2012-10-17"  
}

and our EC2 settings are

discovery.ec2.node\_cache\_time: 120s  
cloud.node.auto\_attributes: true  
discovery.zen.join\_timeout: 90s  
discovery.zen.ping\_timeout: 30s  
discovery.zen.hosts\_provider: ec2

discovery:  
ec2:  
groups: [sg-67b5e51f]  
host\_type: private\_ip

plugin.mandatory: discovery-ec2

network.host: _ec2:privateIpv4_

discovery.zen.minimum\_master\_nodes

The documentation appears to be a little out of date and I cannot understand what is going wrong.

---

<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:** [October 10, 2017, 2:16pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes-not-being-discovered-in-ec2-in-5-6/100222/2 "2017-10-10T14:16:30Z")

</div>

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