# ElasticSeach cluster - Error while adding new node to cluster

**URL:** <https://discuss.elastic.co/t/elasticseach-cluster-error-while-adding-new-node-to-cluster/129879>\
**Category:** Elasticsearch\
**Created:** [April 27, 2018, 7:38pm UTC](https://discuss.elastic.co/t/elasticseach-cluster-error-while-adding-new-node-to-cluster/129879 "2018-04-27T19:38:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajbuddha1](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rajbuddha1](https://discuss.elastic.co/u/rajbuddha1)\
**Post date:** [April 27, 2018, 7:38pm UTC](https://discuss.elastic.co/t/elasticseach-cluster-error-while-adding-new-node-to-cluster/129879/1 "2018-04-27T19:38:25Z")

</div>

Hi Team,

I am working on containerizing existing elastic cluster and I am planning to have setup like 2 server with multiple containers of elasticsearch & kibana within those servers using docker.

I am attaching design & compose files ( for server1 & server2) for creating different types of nodes and settings. So far I am able to create a 5 containers on server1 (being one for kibana) and I am trying to add few more nodes (as containers) to the existing cluster from different server. I am getting below error during adding of node ( from server2) .

Note: On server1 HOST = HOSTA, HOST2=HOSTB  
On Server2 HOST=HOSTB, HOST2=HOSTA

Below are my docker-compose file snippets

Server-1:  
services:  
ess\_elasticsearch1:  
container\_name: ess\_elasticsearch1  
environment:

- cluster.name="ess\_elasticsearch\_cluster"
- bootstrap.memory\_lock=true
- "ES\_JAVA\_OPTS=-Xms2g -Xmx2g"
- "node.name=ess\_elasticsearch1\_${HOST}"
- "network.bind\_host=0.0.0.0"
- "network.publish\_host=${HOST}"
- "discovery.zen.ping.unicast.hosts=${HOST}:9300, ${HOST}:9320, ${HOST}:9330, ${HOST}:9340"
- "transport.host=${HOST}"
- "transport.tcp.port=9300"
- "index.number\_of\_shards: 5"
- "index.number\_of\_replicas: 1"
- "node.master=true"
- "node.data=false"
- "node.ingest=true"  
image: "[docker.elastic.co/elasticsearch/elasticsearch:6.2.4](http://docker.elastic.co/elasticsearch/elasticsearch:6.2.4)"  
ports:
- "9200:9200"
- "9300:9300"  
ulimits:  
memlock:  
hard: -1  
soft: -1  
volumes:
- "/usr/share/elasticsearch/data:/home/mwciuser/mw\_modernization/elastic/data"  
network\_mode: host  
ess\_elasticsearch2:  
container\_name: ess\_elasticsearch2  
environment:
- cluster.name="ess\_elasticsearch\_cluster"
- bootstrap.memory\_lock=true
- "ES\_JAVA\_OPTS=-Xms2g -Xmx2g"
- "ES\_CONNECT\_RETRY=30"
- "node.name=ess\_elasticsearch2\_${HOST}"
- "network.bind\_host=0.0.0.0"
- "network.publish\_host=${HOST}"
- "discovery.zen.ping.unicast.hosts=${HOST}:9300, ${HOST}:9320, ${HOST}:9330, ${HOST}:9340"
- "transport.host=${HOST}"
- "transport.tcp.port=9320"
- "node.master=false"
- "node.data=true"
- "node.ingest=false"  
image: "[docker.elastic.co/elasticsearch/elasticsearch:6.2.4](http://docker.elastic.co/elasticsearch/elasticsearch:6.2.4)"  
ports:
- "9200:9220"
- "9300:9320"  
ulimits:  
memlock:  
hard: -1  
soft: -1  
volumes:
- "/usr/share/elasticsearch/data:/home/mwciuser/mw\_modernization/elastic/data"  
network\_mode: host

Server-2  
services:  
ess\_elasticsearch3:  
container\_name: ess\_elasticsearch3  
environment:

- cluster.name="ess\_elasticsearch\_cluster"
- bootstrap.memory\_lock=true
- "ES\_JAVA\_OPTS=-Xms2g -Xmx2g"
- "ES\_CONNECT\_RETRY=60"
- "node.name=ess\_elasticsearch3\_${HOST}"
- "network.bind\_host=0.0.0.0"
- "network.publish\_host=${HOST}"
- "discovery.zen.ping.unicast.hosts=${HOST2}:9300, ${HOST2}:9320, ${HOST2}:9330, ${HOST2}:9340"
- "transport.host=${HOST}"
- "transport.tcp.port=9330"
- "node.master=true"
- "node.data=false"
- "node.ingest=true"  
image: "[docker.elastic.co/elasticsearch/elasticsearch:6.2.4](http://docker.elastic.co/elasticsearch/elasticsearch:6.2.4)"  
ports:
- "9200:9230"
- "9300:9330"  
ulimits:  
memlock:  
hard: -1  
soft: -1  
volumes:
- "/usr/share/elasticsearch/data:/home/mwciuser/mw\_modernization/elastic/data"  
network\_mode: host  
version: "2.2"

I was able to add 4 elasticsearch nodes of all containers sitting on same server, when I am trying to add 5th node from different server I am getting below error, Please see if anyone can help me on this?

[ess\_elasticsearch3\_labvlnx20.xxx.xxx.com] failed to send join request to master [{ess\_elasticsearch4\_labvlnx130.xxx.xxx.com}{6N6MMkndQWKO3PgxVsuqig}{4ELng\_YgTrOz\_W9TPGEEyQ}{[labvlnx130.xxx.xxx.com](http://labvlnx130.xxx.xxx.com)}{10.64.4.xxx:9340}{ml.machine\_memory=33569316864, ml.max\_open\_jobs=20, ml.enabled=true}], reason [RemoteTransportException[[ess\_elasticsearch4\_labvlnx130.xxx.xxx.com][10.64.4.xxx:9340][internal:discovery/zen/join]]; nested: ConnectTransportException[[ess\_elasticsearch3\_labvlnx20.xxx.xxx.com][10.64.4.xxx:9330] connect\_exception]; nested: IOException[No route to host: [labvlnx20.xxx.xxx.com/10.64.4.xxx:9330](http://labvlnx20.xxx.xxx.com/10.64.4.xxx:9330)]; nested: IOException[No route to host]; ]

here is server-1 : [labvlnx130.xxx.xxx.com](http://labvlnx130.xxx.xxx.com) is server-1 with 4 node working cluster  
server-2 : [labvlnx20.xxx.xxx.com](http://labvlnx20.xxx.xxx.com) is server-2 with a node adding and giving above error

I am able ping from both the servers each other on given ports.

I have gone through some of the issues available and tried setting like elasticsearch\_network\_host, - "transport.type=netty3" also but they did not help me

---

<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:** [May 25, 2018, 7:38pm UTC](https://discuss.elastic.co/t/elasticseach-cluster-error-while-adding-new-node-to-cluster/129879/2 "2018-05-25T19:38:34Z")

</div>

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