# AWS elasticsearch EC2 Discovery, cant find other nodes

**URL:** <https://discuss.elastic.co/t/aws-elasticsearch-ec2-discovery-cant-find-other-nodes/43190>\
**Category:** Elasticsearch\
**Created:** [March 2, 2016, 4:35am UTC](https://discuss.elastic.co/t/aws-elasticsearch-ec2-discovery-cant-find-other-nodes/43190 "2016-03-02T04:35:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Conlin](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mark\_Conlin](https://discuss.elastic.co/u/Mark_Conlin)\
**Post date:** [March 2, 2016, 4:35am UTC](https://discuss.elastic.co/t/aws-elasticsearch-ec2-discovery-cant-find-other-nodes/43190/1 "2016-03-02T04:35:27Z")

</div>

My objective is to create a elasticsearch cluster in AWS using EC2 discovery.

I have 3 instances each running elasticsearch. I have provided each instance a IAM role which allows them to describe ec2 data. Each instance is inside the security group "sec-group-elasticsearch"

The nodes start but do not find each other (logs below).

I can telnet from one node to another using private dns and port 9300.

Reference  
eg. telnet from node A-\>B works and B-\>A works.  
`telnet ip-xxx-xxx-xx-xxx.vpc.fakedomain.com 9300`

iam role for each instance

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

```

sec group rules

```
Inbound
Custom TCP Rule TCP 9200 - 9400 0.0.0.0/0

Outbound
All traffic allowed

```

elasticsearch.yml

> bootstrap.mlockall: false  
> cloud.aws.region: us-east  
> cluster.name: my-ec2-elasticsearch  
> discovery: ec2  
> discovery.ec2.groups: sec-group-elasticsearch  
> discovery.ec2.host\_type: private\_dns  
> discovery.ec2.ping\_timeout: 30s  
> discovery.zen.minimum\_master\_nodes: 2  
> discovery.zen.ping.multicast.enabled: false  
> http.port: 9200  
> network.host: _ec2:privateDns_  
> node.data: false  
> node.master: true  
> transport.tcp.port: 9300

On startup each instance logs like so:

> [2016-03-02 03:13:48,128][INFO][node] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] version[2.1.0], pid[26976], build[72cd1f1/2015-11-18T22:40:03Z]  
> [2016-03-02 03:13:48,129][INFO][node] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] initializing ...  
> [2016-03-02 03:13:48,592][INFO][plugins] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] loaded [cloud-aws], sites [head]  
> [2016-03-02 03:13:48,620][INFO][env] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable\_space [11.4gb], net total\_space [14.6gb], spins? [no], types [ext4]  
> [2016-03-02 03:13:50,928][INFO][node] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] initialized  
> [2016-03-02 03:13:50,928][INFO][node] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] starting ...  
> [2016-03-02 03:13:51,065][INFO][transport] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] publish\_address {[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com/xxx-xxx-xx-xxx:9300](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com/xxx-xxx-xx-xxx:9300)}, bound\_addresses {xxx-xxx-xx-xxx:9300}  
> [2016-03-02 03:13:51,074][INFO][discovery] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] my-ec2-elasticsearch/xVOkfK4TT-GWaPln59wGxw  
> [2016-03-02 03:14:21,075][WARN][discovery] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] waited for 30s and no initial state was set by the discovery  
> [2016-03-02 03:14:21,084][INFO][http] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] publish\_address {[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com/xxx-xxx-xx-xxx:9200](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com/xxx-xxx-xx-xxx:9200)}, bound\_addresses {xxx-xxx-xx-xxx:9200}  
> [2016-03-02 03:14:21,085][INFO][node] [[ip-xxx-xxx-xx-xxx.vpc.fakedomain.com](http://ip-xxx-xxx-xx-xxx.vpc.fakedomain.com)] started

---

<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:** [March 2, 2016, 6:17am UTC](https://discuss.elastic.co/t/aws-elasticsearch-ec2-discovery-cant-find-other-nodes/43190/2 "2016-03-02T06:17:46Z")

</div>

It should be discovery.type: ec2

---

<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, 11:12pm UTC](https://discuss.elastic.co/t/aws-elasticsearch-ec2-discovery-cant-find-other-nodes/43190/3 "2017-07-05T23:12:12Z")

</div>


