# How to check if a master node auto-election is enabled?

**URL:** <https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197>\
**Category:** Elasticsearch\
**Created:** [February 23, 2021, 11:45am UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197 "2021-02-23T11:45:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manikandan\_Kbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manikandan_kbk/32/84390_2.png) [@Manikandan\_Kbk](https://discuss.elastic.co/u/Manikandan_Kbk)\
**Post date:** [February 23, 2021, 11:45am UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/1 "2021-02-23T11:45:21Z")

</div>

We have installed ES 6.2.4 and have 3 master node setup.

1. Is there a way to check if auto-election of master node is enabled in case active master goes down?
2. do elastic search always do auto-election (or) disabling auto-election is also allowed in some es versions?

Note: we have set "discovery.zen.minimum\_master\_nodes: 2" such that split brain won't occur.

---

<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:** [February 23, 2021, 11:58am UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/2 "2021-02-23T11:58:50Z")

</div>

Yes, elections are automatic and no, that cannot be disabled. I can't imagine why you might want to prevent the election of a new master when the old one fails.

You are using a very old version, long past [EOL](https://www.elastic.co/support/eol), and should upgrade as a matter of urgency.

---

<div class="post-metadata">

**Author:** ![Manikandan\_Kbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manikandan_kbk/32/84390_2.png) [@Manikandan\_Kbk](https://discuss.elastic.co/u/Manikandan_Kbk)\
**Post date:** [February 23, 2021, 12:11pm UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/3 "2021-02-23T12:11:53Z")

</div>

@DavidTurner, Thanks for the quick response. I'm actually going through ES documentation and comparing the same with the readymade prod cluster we have. Nowhere I was able to find out if auto election is strictly automatic in the docs (May be I didn't read it properly). So, I was looking for a config that enables/disables auto-master election in the nodes elasticsearch.toml files to see if it's set to true.

Thanks again!. We will soon migrate to newer version.

As a follow up question, if the active Master goes down, from the remaining 2 master-eligible nodes, either of them can become active master. But which nodes are involved in the selection process? Only datanodes?

---

<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:** [February 23, 2021, 12:20pm UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/4 "2021-02-23T12:20:51Z")

</div>

Maybe see [these docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-hosts-providers.html#modules-discovery-hosts-providers)?

> Discovery is the process by which the cluster formation module finds other nodes with which to form a cluster. This process runs when you start an Elasticsearch node or when a node believes the master node failed and continues until the master node is found or a new master node is elected.

Disabling this makes no sense.

> [@Manikandan\_Kbk](#):
>
> But which nodes are involved in the selection process?

Only the master-eligible nodes.

---

<div class="post-metadata">

**Author:** ![Manikandan\_Kbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manikandan_kbk/32/84390_2.png) [@Manikandan\_Kbk](https://discuss.elastic.co/u/Manikandan_Kbk)\
**Post date:** [February 23, 2021, 12:32pm UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/5 "2021-02-23T12:32:31Z")

</div>

@DavidTurner Yes, only the master-eligible nodes can become next Master.  
I'll rephrase,  
Which nodes elect/vote the master-eligible nodes?

In this doc: [Zen Discovery | Elasticsearch Reference [6.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-discovery-zen.html)

Under "Master Election" section, it says, "When the master node stops or has encountered a problem, the cluster nodes start pinging again and will elect a new master."

Do "cluster nodes" here mean only "datanodes" or "masternodes" or both.

---

<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:** [February 23, 2021, 12:48pm UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/6 "2021-02-23T12:48:27Z")

</div>

As I said, only the master-eligible nodes are involved in the selection process, although all the nodes perform pinging.

---

<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 23, 2021, 12:48pm UTC](https://discuss.elastic.co/t/how-to-check-if-a-master-node-auto-election-is-enabled/265197/7 "2021-03-23T12:48:32Z")

</div>

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