EC2 Discovery not working with AWS Cloud plugin. Need Help

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

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 true ${HOSTNAME} /home/ec2-user/data
path.logs: /home/ec2-user/logs
path.plugins: /home/ec2-user/plugins

plugin.mandatory: "cloud-aws" ec2 us-west-2 http
discovery.type: ec2 false
discovery.ec2.groups: sg-d28438b4 Core-ElasticSearch
discovery.ec2.availability_zones: us-west-2
discovery.ec2.any_group: false

"Version": "2012-10-17",
"Statement": [
"Sid": "Stmt1439999260000",
"Effect": "Allow",
"Action": [
"Resource": [


[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][] [ip-172-31-7-97] using initial hosts [, [::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 {}, bound_addresses {}
[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 []

can someone please respond as it is urgent

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

1 Like

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:
  • If you need support with SLA, many companies including elastic can provide that

Hope this helps in the future.

thanks dadoonet.