# AWS EC2 2 nodes not discovering

**URL:** <https://discuss.elastic.co/t/aws-ec2-2-nodes-not-discovering/13271>\
**Category:** Elasticsearch\
**Created:** [August 20, 2013, 3:04pm UTC](https://discuss.elastic.co/t/aws-ec2-2-nodes-not-discovering/13271 "2013-08-20T15:04:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gzion7](https://avatars.discourse-cdn.com/v4/letter/g/b3f665/32.png) [@gzion7](https://discuss.elastic.co/u/gzion7)\
**Post date:** [August 20, 2013, 3:04pm UTC](https://discuss.elastic.co/t/aws-ec2-2-nodes-not-discovering/13271/1 "2013-08-20T15:04:36Z")

</div>

EDIT: SOLVED  
Turns out I had the wrong IP in my security group. Before I changed it I added the port range of 9200-9400 in the config file.  
Even after I changed it it was throwing HTTP exceptions.  
I guess I was being too overzealous with the port definition.  
Removed the ports from the config and all good.  
YAY.

I am using AWS EC2 and I have to elastic nodes and I have configured to unicast and to discover each other. But when I start the service It's showing one connected and not 2.  
Here is a sample from my config:

discovery.zen.ping.multicast.enabled: false

# 

# 2. Configure an initial list of master nodes in the cluster

# to perform discovery when new nodes (master or data) are started:

# 

# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]

discovery.zen.ping.unicast.hosts: ["10.20.5.15", "10.20.5.16"]

Security groups are updated to allow 9200/9300.

Any ideas?

---

<div class="post-metadata">

**Author:** ![gzion7](https://avatars.discourse-cdn.com/v4/letter/g/b3f665/32.png) [@gzion7](https://discuss.elastic.co/u/gzion7)\
**Post date:** [August 20, 2013, 6:13pm UTC](https://discuss.elastic.co/t/aws-ec2-2-nodes-not-discovering/13271/2 "2013-08-20T18:13:21Z")

</div>

Anyone?  
I have a very basic configuration.  
Just 2 nodes in a cluster. When I go to each note via my browser I get this:

{  
"cluster\_name" : "elasticsearch",  
"status" : "green",  
"timed\_out" : false,  
"number\_of\_nodes" : 1,  
"number\_of\_data\_nodes" : 1,  
"active\_primary\_shards" : 0,  
"active\_shards" : 0,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0  
}

There should be a total number of 2 nodes.

---

<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 6, 2017, 2:20am UTC](https://discuss.elastic.co/t/aws-ec2-2-nodes-not-discovering/13271/3 "2017-07-06T02:20:27Z")

</div>

Closed on July 6, 2017, 2:20am UTC


