# Elasticsearch master node failover

**URL:** <https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504>\
**Category:** Elasticsearch\
**Created:** [June 17, 2022, 11:43am UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504 "2022-06-17T11:43:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![artem.zikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem.zikov/32/107194_2.png) [@artem.zikov](https://discuss.elastic.co/u/artem.zikov)\
**Post date:** [June 17, 2022, 11:43am UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/1 "2022-06-17T11:43:29Z")

</div>

Hello. I have Elasticsearch cluster (for graylog) with Elasticsearch-oss 7.10.2  
Cluster has 3 nodes: 2 data/master and 1 master

```auto
# curl -XGET 'localhost:9200/_cat/nodes?v&pretty'
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
10.207.20.22 53 72 0 0.02 0.01 0.00 imr * monlog02p
10.207.20.24 34 100 7 0.70 0.49 0.53 dimr - monlog04p
10.207.20.25 30 100 2 0.32 0.38 0.43 dimr - monlog05p

```

All nodes can be master. But when i stopping current master node (monlog02p), cluster don`t elect new master

```auto
{"type": "server", "timestamp": "2022-06-17T10:56:25,382Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "graylog", "node.name": "monlog05p", "message": "master not discovered or elected yet, an election requires a node with id [bol3_--gRTeY40YE75jMEg], have discovered [{monlog05p}{Wks5aVZIQdKhh-UQfN6Kjw}{p_43YmiFTUWLsz2qi9zLcg}{10.207.20.25}{10.207.20.25:9300}{dimr}, {monlog04p}{RWc0y6fuRZOOy92Ufr5PJQ}{gwTE_agiSEGaLsUMZKm7XA}{10.207.20.24}{10.207.20.24:9300}{dimr}] which is not a quorum; discovery will continue using [10.207.20.24:9300, 10.207.20.22:9300] from hosts providers and [{monlog05p}{Wks5aVZIQdKhh-UQfN6Kjw}{p_43YmiFTUWLsz2qi9zLcg}{10.207.20.25}{10.207.20.25:9300}{dimr}, {monlog04p}{RWc0y6fuRZOOy92Ufr5PJQ}{gwTE_agiSEGaLsUMZKm7XA}{10.207.20.24}{10.207.20.24:9300}{dimr}, {monlog02p}{bol3_--gRTeY40YE75jMEg}{vRDVG-R9RVyx5XauH_4v9Q}{10.207.20.22}{10.207.20.22:9300}{imr}] from last-known cluster state; node term 52, last-accepted version 2847 in term 52", "cluster.uuid": "Ctv7jUkOS9q0f4FJhoy3Ow", "node.id": "Wks5aVZIQdKhh-UQfN6Kjw" }

```

```auto
# curl -X GET "localhost:9200/_cluster/state?filter_path=metadata.cluster_coordination.voting_config_exclusions&pretty"
{
  "metadata" : {
    "cluster_coordination" : {
      "voting_config_exclusions" : [
        {
          "node_id" : "Wks5aVZIQdKhh-UQfN6Kjw",
          "node_name" : "monlog05p"
        },
        {
          "node_id" : "bol3_--gRTeY40YE75jMEg",
          "node_name" : "monlog02p"
        },
        {
          "node_id" : "_absent_",
          "node_name" : "node_name"
        },
        {
          "node_id" : "RWc0y6fuRZOOy92Ufr5PJQ",
          "node_name" : "monlog04p"
        }
      ]
    }
  }
}

```

what I should do?

---

<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:** [June 18, 2022, 2:44pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/2 "2022-06-18T14:44:18Z")

</div>

You should clear your voting config exclusions. See [these docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html#modules-discovery-removing-nodes), particularly

> Clusters should have no voting configuration exclusions in normal operation.

Also, 7.10 has passed [EOL](https://www.elastic.co/support/eol) and is no longer supported. You should upgrade to a supported version as a matter of urgency.

---

<div class="post-metadata">

**Author:** ![artem.zikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem.zikov/32/107194_2.png) [@artem.zikov](https://discuss.elastic.co/u/artem.zikov)\
**Post date:** [June 19, 2022, 6:27am UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/3 "2022-06-19T06:27:49Z")

</div>

```auto
# curl -XDELETE 'localhost:9200/_cluster/voting_config_exclusions'
{"error":{"root_cause":[{"type":"timeout_exception","reason":"timed out waiting for removal of nodes; if nodes should not be removed, set waitForRemoval to false. [{monlog05p}{Wks5aVZIQdKhh-UQfN6Kjw}, {monlog02p}{bol3_--gRTeY40YE75jMEg}, {node_name}{_absent_}, {monlog04p}{RWc0y6fuRZOOy92Ufr5PJQ}]"}],"type":"timeout_exception","reason":"timed out waiting for removal of nodes; if nodes should not be removed, set waitForRemoval to false. [{monlog05p}{Wks5aVZIQdKhh-UQfN6Kjw}, {monlog02p}{bol3_--gRTeY

```

its doesnt work..  
graylog supportns only this version(

---

<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:** [June 20, 2022, 1:58pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/4 "2022-06-20T13:58:47Z")

</div>

I see, there's a small bug in the error message that [#87828](https://github.com/elastic/elasticsearch/pull/87828) fixes. It should read:

> `if nodes should not be removed, set ?wait_for_removal=false`

Set that parameter and it should work.

---

<div class="post-metadata">

**Author:** ![artem.zikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem.zikov/32/107194_2.png) [@artem.zikov](https://discuss.elastic.co/u/artem.zikov)\
**Post date:** [June 20, 2022, 2:29pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/5 "2022-06-20T14:29:11Z")

</div>

> [@artem.zikov](#):
>
> `curl -XGET 'localhost:9200/_cat/nodes?v&pretty'`

```auto
curl -X DELETE "localhost:9200/_cluster/voting_config_exclusions?wait_for_removal=false"

```

thats work! great, thanks

---

<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 18, 2022, 2:29pm UTC](https://discuss.elastic.co/t/elasticsearch-master-node-failover/307504/6 "2022-07-18T14:29:19Z")

</div>

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