# Ec2 discovery does not work with ES 6.0.0

**URL:** https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439
**Category:** Elasticsearch
**Created:** [November 20, 2017, 6:07pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439 "2017-11-20T18:07:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nkoothrappahli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkoothrappahli/32/31959_2.png) [@nkoothrappahli](https://discuss.elastic.co/u/nkoothrappahli)
#### Post date: [November 20, 2017, 6:07pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439/1 "2017-11-20T18:07:24Z")

</div>

I have setup a VPC with 3 subnets in 3 availibility zones and a autoscaling group. All instances has a IAM role which allows to describe the instances (like suggested in the docs). From aws cli this works fine. Then i scale up to 3 nodes but they do not form a cluster. Network connectivity is given cause i can connect from one instance to another with telnet on port 9300.

discovery-ec2 plugin is installed on all nodes and In elasticsearch.yml i added  
`discovery.zen.hosts_provider: ec2`  
`discovery.ec2.host_type: public_dns`  
`discovery.ec2.availability_zones: ["eu-west-1a","eu-west-1b","eu-west-1c"]`  
`network.host: _ec2:publicDns_`  
but the node count of each ES instance is always 1 (so they do not form a cluster)

In the logs i see  
`[2017-11-20T16:28:02,903][INFO][o.e.d.DiscoveryModule] [ec2-xxx.eu-west-1.compute.amazonaws.com] using discovery type [zen]`  
`[2017-11-20T16:28:06,048][TRACE][o.e.d.e.AwsEc2UnicastHostsProvider] [ec2-xxxeu-west-1.compute.amazonaws.com] building dynamic unicast discovery nodes...`  
`[2017-11-20T16:28:06,048][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [ec2-xxx.eu-west-1.compute.amazonaws.com] using dynamic discovery nodes []`  
`[2017-11-20T16:28:09,117][DEBUG][o.e.d.e.Ec2NameResolver] [ec2-xxx.eu-west-1.compute.amazonaws.com] obtaining ec2 hostname from ec2 meta-data url http://169.254.169.254/latest/meta-data/public-hostname`

---

<div class="post-metadata">

### Author: ![shreyask](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@shreyask](https://discuss.elastic.co/u/shreyask)
#### Post date: [November 20, 2017, 7:01pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439/2 "2017-11-20T19:01:13Z")

</div>

I was in a similar situation and adding ec2 endpoint work for me. Details at [Cannot Discover Master Node after upgrade to ES 6.0.0](https://discuss.elastic.co/t/cannot-discover-master-node-after-upgrade-to-es-6-0-0/108029/)

---

<div class="post-metadata">

### Author: ![nkoothrappahli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkoothrappahli/32/31959_2.png) [@nkoothrappahli](https://discuss.elastic.co/u/nkoothrappahli)
#### Post date: [November 23, 2017, 12:19pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439/3 "2017-11-23T12:19:36Z")

</div>

that worked, thx

---

<div class="post-metadata">

### Author: ![shreyask](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@shreyask](https://discuss.elastic.co/u/shreyask)
#### Post date: [November 23, 2017, 1:57pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439/4 "2017-11-23T13:57:10Z")

</div>

Awesome!

---

<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 21, 2017, 1:57pm UTC](https://discuss.elastic.co/t/ec2-discovery-does-not-work-with-es-6-0-0/108439/5 "2017-12-21T13:57:40Z")

</div>

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