# Elasticsearch nodes on aws not showing under single cluster

**URL:** <https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311>\
**Category:** Elasticsearch\
**Created:** [August 5, 2016, 7:10am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311 "2016-08-05T07:10:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 5, 2016, 7:10am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/1 "2016-08-05T07:10:14Z")

</div>

Hi,

We have 3 AWS EC2 servers, where we installed 1 Elasticsearch instance on each of them. We want to have these 3 nodes to be part of the single cluster.

I have exactly followed the steps mentioned in the link [https://www.elastic.co/blog/running-elasticsearch-on-aws](https://www.elastic.co/blog/running-elasticsearch-on-aws) , but I see only 1 node when I do a “\_cluster/health” individually on each of the servers.

curl localhost:9200/\_cluster/health?pretty  
{  
"cluster\_name" : "production",  
"status" : "yellow",  
"timed\_out" : false,  
"number\_of\_nodes" : 1,  
"number\_of\_data\_nodes" : 1,  
"active\_primary\_shards" : 1,  
"active\_shards" : 1,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 1,  
"delayed\_unassigned\_shards" : 0,  
"number\_of\_pending\_tasks" : 0,  
"number\_of\_in\_flight\_fetch" : 0,  
"task\_max\_waiting\_in\_queue\_millis" : 0,  
"active\_shards\_percent\_as\_number" : 50.0  
}

Here is the Elasticsearch.yml configuration:

[cluster.name](http://cluster.name): production

[node.name](http://node.name): ${HOSTNAME}  
node.master: true  
node.data: true

bootstrap.mlockall: true

network.host: [machine IPaddress, _local_]

discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: [other 2 IP's list inlcuding the current machine IP]

Please let me know what additional configuration changes are required here to have the 3 nodes to be part of single cluster.

Thanks,  
Ram

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 5, 2016, 7:17am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/2 "2016-08-05T07:17:42Z")

</div>

As I assume you have 3 master eligible nodes, have you updated [minimum\_mster\_nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-zen.html) to 2 in order to prevent each of the nodes to form their own cluster?

---

<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:** [August 5, 2016, 8:44am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/3 "2016-08-05T08:44:32Z")

</div>

Please format your code using `</>` icon. It will make your post more readable.

Did you check if any firewall is blocking the traffic on port 9300?

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 7, 2016, 2:54am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/4 "2016-08-07T02:54:46Z")

</div>

Hi,  
I tried to set the **discovery.zen.minimum\_master\_node** s: 2 , but i get the following exception

curl localhost:9200/\_cluster/health?pretty  
{  
"error" : {  
"root\_cause" : [ {  
"type" : "master\_not\_discovered\_exception",  
"reason" : null  
} ],  
"type" : "master\_not\_discovered\_exception",  
"reason" : null  
},  
"status" : 503  
}

I have set **node.master** : **true** and **node.data** : **true** on 2 nodes.  
I have set **node.client** : **true** and **node.data** : **false** on the last node.

Am i configuring somehting wrong here?

Thanks,  
RK

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 7, 2016, 5:29am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/5 "2016-08-07T05:29:38Z")

</div>

since the servers are AWS EC2 , should i need to install the "cloud-aws" plugin for Elasticsearch and specify the "AccessKey", "SecretKey" and the "Region" in the elasticsearch.yml file ? are these mandatory for the AWS EC2 servers?

---

<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:** [August 7, 2016, 9:43am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/6 "2016-08-07T09:43:47Z")

</div>

No but you have to define the ip addresses of other servers in unicast list of nodes.

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 8, 2016, 1:16am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/7 "2016-08-08T01:16:04Z")

</div>

yes, i did specify that by doing

```
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: [specifued the IP's of all the 3 nodes including the current machine's IP]

```

Thanks,  
RK

---

<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:** [August 8, 2016, 1:37am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/8 "2016-08-08T01:37:53Z")

</div>

Ok. Note that you don't need the first line.

Did you check if any firewall is blocking port 9300?  
May be your machines are not in the same VPC and you did not explicitly opened port 9300?

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 8, 2016, 3:17am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/9 "2016-08-08T03:17:01Z")

</div>

When i comment out `discovery.zen.minimum_master_nodes: 2` , i get the following result when i do a curl `http://localhost:9200/_cluster/health?pretty`

```
{
  "cluster_name" : "production",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 25,
  "active_shards" : 25,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 25,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}

```

But when i include the `discovery.zen.minimum_master_nodes: 2`, i am getting `master_not_discovered_exception` exception.

I tried the `sudo netstat -tulpn | grep 9300` on the shell, it returns a java process running on the port 9300.

I am able to ping other 2 servers from each of the the server.

currently , My overall elasticsearch.yml configuration is

```
cluster.name: production
node.name: ${HOSTNAME}
node.master: true
#node.data: true
bootstrap.mlockall: true
network.host: [1.2.2.24, _local_]
#network.host: 1.2.2.24
discovery.zen.ping.unicast.hosts: ["1.2.2.24","1.2.1.99", "1.2.2.54"]
discovery.zen.minimum_master_nodes: 2

```

Note: I have included dummy IP's for security reasons

Thanks,  
RK

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 8, 2016, 5:28am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/10 "2016-08-08T05:28:16Z")

</div>

The fact that the java process listens to port 9300 does not indicate that you have connectivity between the nodes. Are you able to telnet from one of the machines to port 9300 on the others?

---

<div class="post-metadata">

**Author:** ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)\
**Post date:** [August 9, 2016, 3:07am UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/11 "2016-08-09T03:07:26Z")

</div>

The 9300 port was blocked on each of the servers. I've enabled it and its working now.

Thanks a lot for your time !!

Regards,  
RK

---

<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, 10:29pm UTC](https://discuss.elastic.co/t/elasticsearch-nodes-on-aws-not-showing-under-single-cluster/57311/12 "2017-07-05T22:29:11Z")

</div>


