# Elasticsearch 5.0.1 fails to be set as a cluster on AWS

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547>\
**Category:** Elasticsearch\
**Created:** [November 18, 2016, 2:07pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547 "2016-11-18T14:07:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylrouss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylrouss/32/13280_2.png) [@sylrouss](https://discuss.elastic.co/u/sylrouss)\
**Post date:** [November 18, 2016, 2:07pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547/1 "2016-11-18T14:07:54Z")

</div>

Hi guys,

With the following **elasticsearch.yaml** :  
[cluster.name](http://cluster.name): test  
[node.name](http://node.name): ${HOSTNAME}

```
network.host: _eth0:ipv4_

discovery.zen.ping.unicast.hosts: ["public_ip_1", "public_ip_2"]
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping_timeout: 10s

```

One host succeeds to be elected as master, whereas the second one fails to join the master.

**Logs from the expected slave** :  
connected to node [{#zen\_unicast\_2#}{ekYs0cmNQbGPTFwL2ZZuFQ}{172.31.10.156}{172.31.10.156:9300}]  
disconnecting from [{#zen\_unicast\_2#}{ekYs0cmNQbGPTFwL2ZZuFQ}{172.31.10.156}{172.31.10.156:9300}] due to explicit disconnect call  
filtered ping responses: (ignore\_non\_masters [false])  
--\> ping\_response{node [{dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300}], id[564], master [{dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300}], cluster\_state\_version [2], cluster\_name[mrgiggy-cluster-sly]}  
--\> ping\_response{node [{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}], id[1849], master [null], cluster\_state\_version [-1], cluster\_name[mrgiggy-cluster-sly]}  
processing [zen-disco-election-stop [{dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300} elected]]: execute  
processing [zen-disco-election-stop [{dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300} elected]]: took [0s] no change in cluster\_state  
disconnecting from [{#zen\_unicast\_1#}{E\_PHzBqzRUuv-8-dK79lHA}{172.31.10.157}{172.31.10.157:9300}] due to explicit disconnect call  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: execute  
cluster state update task [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]] failed  
org.elasticsearch.cluster.NotMasterException: Node [{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}] not master for join request  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: took [0s] no change in cluster\_state  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: execute  
cluster state update task [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]] failed  
org.elasticsearch.cluster.NotMasterException: Node [{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}] not master for join request  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: took [0s] no change in cluster\_state  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: execute  
cluster state update task [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]] failed  
org.elasticsearch.cluster.NotMasterException: Node [{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}] not master for join request  
processing [zen-disco-node-join[{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}]]: took [0s] no change in cluster\_state  
failed to send join request to master [{dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300}], reason [RemoteTransportException[[3bd521b16904][172.17.0.2:9300][internal:discovery/zen/join]]; nested: NotMasterException[Node [{3bd521b16904}{zRlNhZEHRx-czZnRu8rMAw}{FgQgX8X0SW2b1QevmCVf6A}{172.17.0.2}{172.17.0.2:9300}] not master for join request]; ], tried [3] times  
processing [finalize\_join ({dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300})]: execute  
processing [finalize\_join ({dcc65eaca77f}{TzGpUkVZTbSpC6JOYczpfw}{bICdACsIRQmHyK8ULAHJGg}{172.17.0.2}{172.17.0.2:9300})]: took [0s] no change in cluster\_state

Any idea?

---

<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:** [November 18, 2016, 3:06pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547/2 "2016-11-18T15:06:13Z")

</div>

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

Why do you use the public\_ip addresses in unicast list?  
Try with the private IPs which I believe are the same as given by `_eth0:ipv4`?

If it does not answer to your question, can you provide the full logs of both servers?

---

<div class="post-metadata">

**Author:** ![sylrouss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylrouss/32/13280_2.png) [@sylrouss](https://discuss.elastic.co/u/sylrouss)\
**Post date:** [November 18, 2016, 3:52pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547/3 "2016-11-18T15:52:59Z")

</div>

You're right. I tried with the private IPs, given the same failure.  
I finally decided to not use docker as it works from the first test without it.

---

<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:** [November 18, 2016, 4:06pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547/4 "2016-11-18T16:06:55Z")

</div>

So you are using Docker? It was not explicitly said here or I missed that.

I see now that you actually opened another discussion

> [@Elasticsearch 5.0.1 fails to start on AWS with discovery-ec2: BindException\[Cannot assign requested address\]](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-start-on-aws-with-discovery-ec2-bindexception-cannot-assign-requested-address/66524):
>
> Hi friends, With the following elasticsearch.yaml: [cluster.name](http://cluster.name): \*\*\* [node.name](http://node.name): ${HOSTNAME} cloud: aws: region: eu-west-1 discovery: type: ec2 network: host: \_ec2 discovery.zen.minimum\_master\_nodes: 1 discovery.zen.ping\_timeout: 10s Dockerfile: FROM elasticsearch:5.0 RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install discovery-ec2 COPY elasticsearch.yml /usr/share/elasticsearch/config/ COPY log4j2.properties /usr/share/elasticsearch/config/ USER elasti…

---

<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:** [December 16, 2016, 4:07pm UTC](https://discuss.elastic.co/t/elasticsearch-5-0-1-fails-to-be-set-as-a-cluster-on-aws/66547/5 "2016-12-16T16:07:24Z")

</div>

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