# Non master node not able to join a master node

**URL:** <https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825>\
**Category:** Elasticsearch\
**Created:** [August 13, 2020, 8:19am UTC](https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825 "2020-08-13T08:19:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dishant.chawla.338](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dishant.chawla.338/32/45546_2.png) [@dishant.chawla.338](https://discuss.elastic.co/u/dishant.chawla.338)\
**Post date:** [August 13, 2020, 8:19am UTC](https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825/1 "2020-08-13T08:19:21Z")

</div>

I'm initializing a cluster with 2 node setup more nodes will be joining the cluster in near future.Both nodes are on different machine.

One node will be a master node with the below configuration:

transport.host: localhost  
transport.tcp.port: 9300  
http.port: 9200  
network.host: 0.0.0.0  
http.cors.enabled : true  
http.cors.allow-origin : "\*"  
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE  
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization  
path.repo: ["/backups"]  
cluster.name: "es-cluster"  
node.name: "node-1"  
node.master: true  
node.data: true  
discovery.seed\_hosts: ["127.0.0.1", "[::1]"]  
cluster.initial\_master\_nodes: ["node-1"]

Other node being the non master has below configuration:  
transport.host: localhost  
transport.tcp.port: 9300  
http.port: 9200  
network.host: 0.0.0.0  
http.cors.enabled : true  
http.cors.allow-origin : "\*"  
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE  
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length  
path.repo: ["/backups"]  
cluster.name: "es-cluster"  
node.name: "node-2"  
node.master: false  
node.data: true  
discovery.seed\_hosts: ["10.xx.xx.xxx"]

It shows the below message and does not join the cluster.  
publish\_address {localhost/127.0.0.1:9300}, bound\_addresses {127.0.0.1:9300}, {[::1]:9300}  
[2020-08-13T13:39:56,804][WARN][o.e.c.c.ClusterFormationFailureHelper] [node-2] master not discovered yet: have discovered [{node-2}{1CebzVMzSZKPg0rAVVEImA}{vt9uwooRRea8Th3ygKokTw}{localhost}{127.0.0.1:9300}{dilrt}{ml.machine\_memory=16057425920, xpack.installed=true, transform.node=true, ml.max\_open\_jobs=20}]; discovery will continue using [10.81.72.243:9300] from hosts providers and from last-known cluster state; node term 0, last-accepted version 0 in term 0

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 13, 2020, 8:41am UTC](https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825/2 "2020-08-13T08:41:58Z")

</div>

> [@dishant.chawla.338](#):
>
> Both nodes are on different machine.  
> ...
> 
> ```auto
> transport.host: localhost
> transport.tcp.port: 9300
> 
> ```

You cannot form a cluster across different machines if the nodes are only listening on `localhost`. Delete these `transport.*` lines from your config.

---

<div class="post-metadata">

**Author:** ![dishant.chawla.338](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dishant.chawla.338/32/45546_2.png) [@dishant.chawla.338](https://discuss.elastic.co/u/dishant.chawla.338)\
**Post date:** [August 13, 2020, 8:58am UTC](https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825/3 "2020-08-13T08:58:36Z")

</div>

Thank you so much David.It worked.

---

<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:** [September 10, 2020, 8:58am UTC](https://discuss.elastic.co/t/non-master-node-not-able-to-join-a-master-node/244825/4 "2020-09-10T08:58:46Z")

</div>

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