# Two Node Cluster Failover did not work

**URL:** https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583
**Category:** Elasticsearch
**Created:** [February 27, 2023, 12:29pm UTC](https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583 "2023-02-27T12:29:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sven\_begis](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sven\_begis](https://discuss.elastic.co/u/sven_begis)
#### Post date: [February 27, 2023, 12:29pm UTC](https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583/1 "2023-02-27T12:29:33Z")

</div>

Two Node Cluster Failover did not work

Hello, I'm trying to set up a two node cluster.

- VST-ELA01  
-- RAM = 8 GB  
-- CPU = 8  
-- HD = 100 GB  
-- OS = Ubuntu 22.04 LTS

- VST-ELA02  
-- RAM = 8 GB  
-- CPU = 8  
-- HD = 100 GB  
-- OS = Ubuntu 22.04 LTS

- Elasticsearch Version = elasticsearch-7.8.1-amd64.deb

- Config VST-ELA01

```auto
cluster.name: myescluster
node.name: ${HOSTNAME}
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["192.168.XXX.230", "192.168.XXX.231"]
path.data: /elastic/data
path.logs: /var/log/elasticsearch

```

- Config VST-ELA02

```auto

cluster.name: myescluster
node.name: ${HOSTNAME}
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["192.168.XXX.230", "192.168.XXX.231"]
path.data: /elastic/data
path.logs: /var/log/elasticsearch

```

In Cluster mode, all works fine (All Nodes Up).

But when I shut down the first Node, VST-ELA01,  
I can only GET Data from the Second Node, VST-ELA02,  
if I try to Post something, I get an error

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "cluster_block_exception",
        "reason" : "blocked by: [SERVICE_UNAVAILABLE/2/no master];"
      }
    ],
    "type" : "cluster_block_exception",
    "reason" : "blocked by: [SERVICE_UNAVAILABLE/2/no master];"
  },
  "status" : 503
}

```

and in the Logs of the Second Server, VST-ELA02

```auto
[vst-ela02] master not discovered or elected yet, an election requires a node with id [kTkCnlBqQbiFpWx8QSFO4Q], 
have discovered [{vst-ela02}{5iyrLlvLTBa9xdhON3X8GQ}{mM7VG9rISdS_zJd8NsWvrw}{192.168.XXX.231}{192.168.XXX.231:9300}{dilmrt}{ml.machine_memory=8267603968,
xpack.installed=true, transform.node=true, ml.max_open_jobs=20}] which is not a quorum; 
discovery will continue using [192.168.XXX.230:9300] from hosts providers and

```

What must I do that the Second Note VST-ELA02 takes the Master rolle when VST-ELA01 is down  
or Elastic is stop?

I Also tried

> **[Resilience in small clusters | Elasticsearch Guide \[7.8\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/high-availability-cluster-small-clusters.html#high-availability-cluster-design-two-nodes)**

We recommend you set node.master: false on one of your two nodes so that it is not master-eligible.  
This means you can be certain which of your nodes is the elected master of the cluster.  
The cluster can tolerate the loss of the other master-ineligible node.  
If you don’t set node.master: false on one node, both nodes are master-eligible.  
This means both nodes are required for a master election.  
Since the election will fail if either node is unavailable,  
your cluster cannot reliably tolerate the loss of either node.

But has the same effect as above.

Hope someone has a solution.

Or is it not Possible what I want to do, with a Two Node Cluster setup?

As I found this in that Topic

> [@\[ES6 upgrade ES7\] The two-node cluster works normally, but the master node fails, the slave node tries to reconnect, and does not recommend itself as the new master node](https://discuss.elastic.co/t/es6-upgrade-es7-the-two-node-cluster-works-normally-but-the-master-node-fails-the-slave-node-tries-to-reconnect-and-does-not-recommend-itself-as-the-new-master-node/205777/10):
>
> 续上 [2019-10-30T10:36:08,674][WARN][o.e.c.c.ClusterFormationFailureHelper] [node\_20.23.72.15] master not discovered or elected yet, an election requires a node with id [pyKYCHjPQLGcM3EwI\_Dc8A], have discovered [{node\_20.23.72.15}{JaQ87iQpS0qLomhZvl-tPQ}{V\_vcpdirTYeeRRz9xKmjlg}{20.23.72.15}{20.23.72.15:27336}{dim}] which is not a quorum; discovery will continue using from hosts providers and [{node\_20.23.72.15}{JaQ87iQpS0qLomhZvl-tPQ}{V\_vcpdirTYeeRRz9xKmjlg}{20.23.72.15}{20.23.72.15:27336}{dim}…

Christian\_Dahlqvist  
Oct 2019

You can not have a highly available cluster with 2 nodes. At least 3 master eligible nodes are required.

THX Sven

---

<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: [February 27, 2023, 12:31pm UTC](https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583/2 "2023-02-27T12:31:51Z")

</div>

> [@sven\_begis](#):
>
> What must I do that the Second Note VST-ELA02 takes the Master rolle when VST-ELA01 is down  
> or Elastic is stop?

That is not possible. You must have at least 3 master-eligible nodes in a cluster in order to be able to continue operating fully even if one of the nodes go down.

---

<div class="post-metadata">

### Author: ![sven\_begis](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sven\_begis](https://discuss.elastic.co/u/sven_begis)
#### Post date: [February 27, 2023, 12:32pm UTC](https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583/3 "2023-02-27T12:32:26Z")

</div>

Thanks for your fast help.

---

<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 27, 2023, 12:33pm UTC](https://discuss.elastic.co/t/two-node-cluster-failover-did-not-work/326583/4 "2023-03-27T12:33:21Z")

</div>

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