Elasticsearch 5.0.1 fails to be set as a cluster on AWS

Hi guys,

With the following elasticsearch.yaml:
cluster.name: test
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?

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?

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.

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

I see now that you actually opened another discussion

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