Ec2 discovery does not work with ES 6.0.0

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

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

2 Likes

that worked, thx

Awesome!

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