# Handshake failed. unexpected remote node

**URL:** <https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082>\
**Category:** Elasticsearch\
**Created:** [January 25, 2018, 4:46pm UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082 "2018-01-25T16:46:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ujaku\_San](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ujaku_san/32/18838_2.png) [@Ujaku\_San](https://discuss.elastic.co/u/Ujaku_San)\
**Post date:** [January 25, 2018, 4:46pm UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082/1 "2018-01-25T16:46:22Z")

</div>

Hi,

using the elasticsearch docker image `docker.elastic.co/elasticsearch/elasticsearch:6.1.2` I can't connect two nodes on different digitalocean droplets. I've created both containers with:

droplet1:  
`docker run -d -p 9200:9200 -p 9300:9300 --name es1 -h es-asm-1 -v /opt/esdata1:/usr/share/elasticsearch/data -e "cluster.name=btwaf" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "network.host=0.0.0.0" -e "network.bind_host=0.0.0.0" -e "network.publish_host=0.0.0.0" -e "transport.host=0.0.0.0" --ulimit memlock=-1:-1 docker.elastic.co/elasticsearch/elasticsearch:6.1.2`

droplet2:  
`docker run -d -p 9200:9200 -p 9300:9300 --name es1 -h es-asm-2 -v /opt/esdata1:/usr/share/elasticsearch/data -e "cluster.name=mycluster" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" -e "discovery.zen.ping.unicast.hosts=droplet1:9300" -e "network.host=0.0.0.0" -e "network.bind_host=0.0.0.0" -e "network.publish_host=0.0.0.0" -e "transport.host=0.0.0.0" --ulimit memlock=-1:-1 docker.elastic.co/elasticsearch/elasticsearch:6.1.2`

but on the second node I get this error:

`org.elasticsearch.transport.ConnectTransportException: [Bs4USmT][172.17.0.2:9300] handshake failed. unexpected remote node`

any idea?

thanks

---

<div class="post-metadata">

**Author:** ![jpcarey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpcarey/32/46668_2.png) [@jpcarey](https://discuss.elastic.co/u/jpcarey)\
**Post date:** [January 25, 2018, 8:51pm UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082/2 "2018-01-25T20:51:03Z")

</div>

`network.publish_host=0.0.0.0` should be the address that you expect other nodes to use for communication. `discovery.zen.ping.unicast.hosts` says try talking to one of these hosts to find an elasticsearch cluster. The node it talks to then provides the cluster state, which would contain a list of all the nodes in the cluster + the the address (publish\_host) that should be used to establish communication with each of those nodes.

`network.bind_host` = the interfaces that you want elasticsearch available on  
`network.host` = a shortcut for setting both `bind_host` and `publish_host`  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.1/modules-network.html#common-network-settings](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/modules-network.html#common-network-settings)

---

<div class="post-metadata">

**Author:** ![sbu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sbu/32/27718_2.png) [@sbu](https://discuss.elastic.co/u/sbu)\
**Post date:** [February 14, 2018, 3:56pm UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082/3 "2018-02-14T15:56:47Z")

</div>

Did you ever get a solution for this? I can see the answer from Jared is useful, but not sure if this solves the problem. I'm facing a similar issue for which I've posted a separate question.

---

<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:** [March 14, 2018, 3:58pm UTC](https://discuss.elastic.co/t/handshake-failed-unexpected-remote-node/117082/4 "2018-03-14T15:58:14Z")

</div>

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