# EC2 Discovery not working with AWS Cloud plugin. Need Help

**URL:** <https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769>\
**Category:** Elasticsearch\
**Created:** [June 23, 2016, 11:16am UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769 "2016-06-23T11:16:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shailender\_arya](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shailender\_arya](https://discuss.elastic.co/u/shailender_arya)\
**Post date:** [June 23, 2016, 11:16am UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/1 "2016-06-23T11:16:21Z")

</div>

I have 2 EC2 nodes and aws cloud plugin and auto discovery is not working .  
both the nodes they start and dont find each other.  
Kindly help

**_elastic version_** - elasticsearch-2.3.3  
**java version** openjdk version "1.8.0\_91"  
**plugin version** =2.3.3

Both Ec2 Instances belong to same security group and security group setting is as follows  
_type: All traffic_  
_protocol: All_  
_port range : All_  
_source: sg-d28438b4_

**ELASTIC.YML**  
[cluster.name](http://cluster.name): core  
action.destructive\_requires\_name: true  
index.mapper.dynamic: false  
Action.auto\_create\_index: false  
discovery.zen.master\_election.filter\_client: true  
node.max\_local\_storage\_nodes: 1  
gateway.recover\_after\_time: 5m  
bootstrap.mlockall: true  
http.port: 9200  
transport.tcp.port: 9300  
node.master: true  
node.data: true  
[node.name](http://node.name): ${HOSTNAME}  
path.data: /home/ec2-user/data  
path.logs: /home/ec2-user/logs  
path.plugins: /home/ec2-user/plugins

plugin.mandatory: "cloud-aws"  
network.host: _ec2_  
cloud.aws.access\_key:   
cloud.aws.secret\_key:   
cloud.aws.region: us-west-2  
cloud.aws.ec2.protocol: http  
discovery.type: ec2  
discovery.zen.ping.multicast.enabled: false  
discovery.ec2.groups: sg-d28438b4  
[discovery.ec2.tag.name](http://discovery.ec2.tag.name): Core-ElasticSearch  
discovery.ec2.availability\_zones: us-west-2  
discovery.ec2.any\_group: false

== **IAM POLICY** ==  
{  
"Version": "2012-10-17",  
"Statement": [  
{  
"Sid": "Stmt1439999260000",  
"Effect": "Allow",  
"Action": [  
"ec2:DescribeAvailabilityZones",  
"ec2:DescribeInstances",  
"ec2:DescribeRegions",  
"ec2:DescribeSecurityGroups",  
"ec2:DescribeTags"  
],  
"Resource": [  
"\*"  
]  
}  
]  
}

= **LOGS** =

[2016-06-23 10:54:23,145][INFO][node] [ip-172-31-7-97] version[2.3.3], pid[27354], build[218bdf1/2016-05-17T15:40:04Z]  
[2016-06-23 10:54:23,145][INFO][node] [ip-172-31-7-97] initializing ...  
[2016-06-23 10:54:23,966][INFO][plugins] [ip-172-31-7-97] modules [reindex, lang-expression, lang-groovy], plugins [cloud-aws], sites []  
[2016-06-23 10:54:23,988][INFO][env] [ip-172-31-7-97] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable\_space [6.3gb], net total\_space [7.7gb], spins? [no], types [ext4]  
[2016-06-23 10:54:23,988][INFO][env] [ip-172-31-7-97] heap size [990.7mb], compressed ordinary object pointers [true]  
[2016-06-23 10:54:23,989][WARN][env] [ip-172-31-7-97] max file descriptors [60000] for elasticsearch process likely too low, consider increasing to at least [65536]  
[2016-06-23 10:54:25,435][DEBUG][discovery.zen.elect] [ip-172-31-7-97] using minimum\_master\_nodes [-1]  
[2016-06-23 10:54:25,828][DEBUG][discovery.ec2] [ip-172-31-7-97] using host\_type [PRIVATE\_IP], tags [{}], groups [[]] with any\_group [true], availability\_zones [[us-west-2]]  
[2016-06-23 10:54:25,833][DEBUG][discovery.zen.ping.unicast] [ip-172-31-7-97] using initial hosts [127.0.0.1, [::1]], with concurrent\_connects [10]  
[2016-06-23 10:54:25,844][DEBUG][discovery.ec2] [ip-172-31-7-97] using ping.timeout [3s], join.timeout [1m], master\_election.filter\_client [true], master\_election.filter\_data [false]  
[2016-06-23 10:54:25,847][DEBUG][discovery.zen.fd] [ip-172-31-7-97] [master] uses ping\_interval [1s], ping\_timeout [30s], ping\_retries [3]  
[2016-06-23 10:54:25,851][DEBUG][discovery.zen.fd] [ip-172-31-7-97] [node] uses ping\_interval [1s], ping\_timeout [30s], ping\_retries [3]  
[2016-06-23 10:54:26,416][DEBUG][discovery.ec2] [ip-172-31-7-97] using host\_type [PRIVATE\_IP], tags [{}], groups [[]] with any\_group [true], availability\_zones [[us-west-2]]  
[2016-06-23 10:54:26,417][DEBUG][discovery.ec2] [ip-172-31-7-97] using host\_type [PRIVATE\_IP], tags [{}], groups [[]] with any\_group [true], availability\_zones [[us-west-2]]  
[2016-06-23 10:54:26,450][INFO][node] [ip-172-31-7-97] initialized  
[2016-06-23 10:54:26,450][INFO][node] [ip-172-31-7-97] starting ...  
[2016-06-23 10:54:26,576][INFO][transport] [ip-172-31-7-97] publish\_address {172.31.7.97:9300}, bound\_addresses {172.31.7.97:9300}  
[2016-06-23 10:54:26,582][INFO][discovery] [ip-172-31-7-97] core/oZX\_BujCTzaTi3kXlmE3Cw  
[2016-06-23 10:54:26,588][TRACE][discovery.zen] [ip-172-31-7-97] starting to accumulate joins  
[2016-06-23 10:54:26,588][TRACE][discovery.ec2] [ip-172-31-7-97] starting to ping  
[2016-06-23 10:54:26,841][TRACE][discovery.ec2] [ip-172-31-7-97] building dynamic unicast discovery nodes...  
**_[2016-06-23 10:54:26,842][DEBUG][discovery.ec2] [ip-172-31-7-97] using dynamic discovery nodes []_**

---

<div class="post-metadata">

**Author:** ![shailender\_arya](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shailender\_arya](https://discuss.elastic.co/u/shailender_arya)\
**Post date:** [June 23, 2016, 6:36pm UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/2 "2016-06-23T18:36:45Z")

</div>

can someone please respond as it is urgent

---

<div class="post-metadata">

**Author:** ![shailender\_arya](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shailender\_arya](https://discuss.elastic.co/u/shailender_arya)\
**Post date:** [June 24, 2016, 10:44am UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/3 "2016-06-24T10:44:58Z")

</div>

after removing  
discovery.ec2.availability\_zones: us-west-2  
and using quotes around strings in yml it started working.  
but wasted 2 days in this

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 24, 2016, 11:21am UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/4 "2016-06-24T11:21:13Z")

</div>

Thanks for the follow up.

Some notes:

- Format your code with this icon `</>`: it makes it easier to read and understand so someone could give a quicker answer.
- Don't say it's urgent after a couple of hours. This is a public forum where everyone is trying to do its best. So be patient as explained here: [https://www.elastic.co/community/codeofconduct](https://www.elastic.co/community/codeofconduct)
- If you need support with SLA, many companies [including elastic](https://www.elastic.co/subscriptions) can provide that

Hope this helps in the future.

---

<div class="post-metadata">

**Author:** ![shailender\_arya](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shailender\_arya](https://discuss.elastic.co/u/shailender_arya)\
**Post date:** [June 24, 2016, 2:25pm UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/5 "2016-06-24T14:25:01Z")

</div>

thanks dadoonet.

---

<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:** [July 5, 2017, 10:40pm UTC](https://discuss.elastic.co/t/ec2-discovery-not-working-with-aws-cloud-plugin-need-help/53769/6 "2017-07-05T22:40:41Z")

</div>


