# Elasticsearch 7.13 2 nodes cluster

**URL:** https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079
**Category:** Elasticsearch
**Created:** [June 16, 2021, 5:23am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079 "2021-06-16T05:23:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)
#### Post date: [June 16, 2021, 5:23am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/1 "2021-06-16T05:23:26Z")

</div>

Hi  
I have two nodes(xnode1, xnode2) cluster on elasticsearch 7.13. I made cluster succesfully, it showing 2 nodes in cluster.  
For testing i stop xnode2, it showing 1 node cluster. but when stop xnode1 , then try curl with xnode2 it showing : master\_not\_discovered\_exception.

When i stooping 2nd node xnode2 getting

```auto
[2021-06-15T07:10:31,830][WARN][o.e.c.c.ClusterFormationFailureHelper] [xnode1] master not discovered or elected yet, an election requires a node with id [D4NWZ2baTf2hdUF6VgZ65A], have discovered [{xnode2}{Q8_O0deGQomb2mGM5KN4Ew}{3cAb9kpeS1SpCGOlN17MFQ}{192.168.10.2}{192.168.10.2:9300}{cdfhilmrstw}] which is not a quorum; discovery will continue using [192.168.10.1:9300] from hosts providers and [{vodaxsimnode1}{D4NWZ2baTf2hdUF6VgZ65A}{JdGeacDuT6Cvcl0poLgDJQ}{192.168.10.1}{192.168.10.1:9300}{cdfhilmrstw}, {xnode2}{Q8_O0deGQomb2mGM5KN4Ew}{3cAb9kpeS1SpCGOlN17MFQ}{192.168.10.22}{192.168.10.2:9300}{cdfhilmrstw}] from last-known cluster state; node term 3, last-accepted version 49 in term 3
 
 Please help me, i want make cluster with two nodes. Thanks
 
 Configuration on xnode1 :
 
 cluster.name: mucluster
 node.name: xnode1
 #network.host: 0.0.0.0
 network.host: 192.168.10.1
 http.port: 8207
 
discovery.seed_hosts : ["192.168.10.1","192.168.10.2"]
 
cluster.initial_master_nodes: ["192.168.10.1","192.168.10.2"]
#cluster.initial_master_nodes: ["xnode1","xnode2"]
 
 
 
 Configuration on xnode2 :
  
 cluster.name: mucluster
 node.name: xnode2
 #network.host: 0.0.0.0
 network.host: 192.168.10.2
 http.port: 8207
 
discovery.seed_hosts : ["192.168.10.1","192.168.10.2"]
 
cluster.initial_master_nodes: ["192.168.10.1","192.168.10.2"]
#cluster.initial_master_nodes: ["xnode1","xnode2"]

```

---

<div class="post-metadata">

### Author: ![angelo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angelo/32/61325_2.png) [@angelo](https://discuss.elastic.co/u/angelo)
#### Post date: [June 16, 2021, 8:20pm UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/2 "2021-06-16T20:20:58Z")

</div>

This older [post](https://discuss.elastic.co/t/master-not-discovered-exception-for-two-node-cluster/243452/3) provides more details.

Also, this part of [docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/add-elasticsearch-nodes.html#modules-discovery-removing-nodes) may also be of benefit to understand the situation when you are down to 2 master-eligible nodes and one is removed.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 16, 2021, 8:33pm UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/3 "2021-06-16T20:33:15Z")

</div>

A 2 node cluster can not be highly available and continue operating fully if one node goes down. Please read [this section in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/high-availability-cluster-small-clusters.html) for further details.

---

<div class="post-metadata">

### Author: ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)
#### Post date: [June 17, 2021, 4:06am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/4 "2021-06-17T04:06:39Z")

</div>

But cluster made success and when i stop 2nd node, then cluster showing 1 node. but when i stop 1st node then , then there is no master, means in my case only first node becoming master.  
in previous version i did that. please help if i have two nodes

what will my configuration for 3rd node, if going to add

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 17, 2021, 5:13am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/5 "2021-06-17T05:13:17Z")

</div>

In order to elect a master a strict majority of master eligible nodes need to be available. The majority of 2 is 2 which means a 2-node cluster can not elect a master as soon as one node is down. If you add a third node with the same main configuration you have 3 master eligible nodes in the cluster. The majority of 3 is 2 which means that even if 1 node goes offline the remaining 2 can elect a master and continue operating safely.

---

<div class="post-metadata">

### Author: ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)
#### Post date: [June 17, 2021, 5:23am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/6 "2021-06-17T05:23:02Z")

</div>

okay, but i my case only first node become master, even i stopped 2nd node first working.  
[If 2nd node stopped then in cluster showing 1 node] , but when stooping 1st one this one become issue, why i can not make 2nd node master, already given in configuration.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 17, 2021, 5:29am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/7 "2021-06-17T05:29:37Z")

</div>

I am not sure I understand. It doesn't matter which node is elected master when both nodes are available.

---

<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: [July 15, 2021, 5:29am UTC](https://discuss.elastic.co/t/elasticsearch-7-13-2-nodes-cluster/276079/8 "2021-07-15T05:29:46Z")

</div>

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