# Issue with adding nodes to cluster

**URL:** <https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945>\
**Category:** Elasticsearch\
**Created:** [August 4, 2017, 7:08pm UTC](https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945 "2017-08-04T19:08:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![infamous](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@infamous](https://discuss.elastic.co/u/infamous)\
**Post date:** [August 4, 2017, 7:08pm UTC](https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945/1 "2017-08-04T19:08:54Z")

</div>

Hi all,  
I have 2 EC2 Windows instances running with Elasticsearch 5.5.1 and I want to connect them into a cluster, but I'm having trouble having them find eachother. Here are their YMLs:

```
cluster.name: mycluster
node.name: nodeA
node.master: true
node.data: true
network.host: ip1
http.port: 9200
discovery.zen.ping.unicast.hosts: [ip1, ip2]

cluster.name: mycluster
node.name: nodeB
node.master: true
node.data: true
network.host: ip2
http.port: 9200
discovery.zen.ping.unicast.hosts: [ip1, ip2]

```

Their IPs are set to the assigned private EC2 IP addresses. I have tried using public IPs as well.

AWS security groups for the instances have been set up to include IPs from anywhere. Their respective IPs return responses when pinged.

I have also tried the EC2 discovery plugin. Both have that plugin installed and are included in an AWS group policy that corresponds to my AWS credentials. The YML looks like this:

```
discovery.type: ec2
discovery.ec2.groups: mygroup
discovery.zen.hosts_provider: ec2
cloud.aws.access_key: mykey
cloud.aws.secret_key: myotherkey
cloud.aws.region:us-east-2

```

Saw this and followed very closely: [https://www.elastic.co/blog/running-elasticsearch-on-aws](https://www.elastic.co/blog/running-elasticsearch-on-aws)

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 4, 2017, 10:49pm UTC](https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945/2 "2017-08-04T22:49:47Z")

</div>

What do the logs show?

---

<div class="post-metadata">

**Author:** ![infamous](https://avatars.discourse-cdn.com/v4/letter/i/df705f/32.png) [@infamous](https://discuss.elastic.co/u/infamous)\
**Post date:** [August 7, 2017, 2:31pm UTC](https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945/3 "2017-08-07T14:31:12Z")

</div>

Hi @warkolm,

```
[2017-08-07T14:14:18,059][INFO][o.e.n.Node] [nodeA] node name [nodeA], node ID [0gppTofrQNaJpMDn84kQRw] 
....
[2017-08-07T14:14:24,609][INFO][o.e.d.DiscoveryModule] [nodeA] using discovery type [zen]
[2017-08-07T14:14:25,239][INFO][o.e.n.Node] [nodeA] initialized
[2017-08-07T14:14:25,240][INFO][o.e.n.Node] [nodeA] starting ...
[2017-08-07T14:14:25,556][INFO][o.e.t.TransportService] [nodeA] publish_address {ip1:9300}, bound_addresses {ip1:9300}
[2017-08-07T14:14:25,569][INFO][o.e.b.BootstrapChecks] [nodeA] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-08-07T14:14:28,635][INFO][o.e.c.s.ClusterService] [nodeA] new_master {nodeA}{0gppTofrQNaJpMDn84kQRw}{f_mVXakOToSNZ6FaAAGx3w}{ip1}{ip1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-08-07T14:14:28,664][INFO][o.e.h.n.Netty4HttpServerTransport] [nodeA] publish_address {ip1:9200}, bound_addresses {ip1:9200}
[2017-08-07T14:14:28,665][INFO][o.e.n.Node] [nodeA] started

```

Both logs are like this, with different node names and ips obviously. Also checked both VPC and subnet, they are all the same for the instances. They can ping eachother's private IP.

Thanks!

---

<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:** [September 4, 2017, 2:31pm UTC](https://discuss.elastic.co/t/issue-with-adding-nodes-to-cluster/95945/4 "2017-09-04T14:31:15Z")

</div>

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