# Prevent setting minimum\_master\_nodes to more than the current node count

**URL:** <https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536>\
**Category:** Elasticsearch\
**Created:** [February 27, 2023, 3:11am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536 "2023-02-27T03:11:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhoumengbo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhoumengbo/32/117773_2.png) [@zhoumengbo](https://discuss.elastic.co/u/zhoumengbo)\
**Post date:** [February 27, 2023, 3:11am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/1 "2023-02-27T03:11:08Z")

</div>

Setting `zen.discovery.minimum_master_nodes` to a value higher than the current node count effectively leaves the cluster without a master and unable to process requests.

The official website below has fixed this bug.  
[https://www.elastic.co/guide/en/elasticsearch/resiliency/current/index.html](https://www.elastic.co/guide/en/elasticsearch/resiliency/current/index.html)

The official version 1.5.0 fixed this defect by adding verification, which does not solve this problem in my opinion. When a node in the cluster exits due to a crash, the cluster still cannot elect a new master. I verified this on version 1.5.0. Set `discovery.zen.minimum_master_nodes:3`, start a cluster of 3 nodes and run normally, shut down one node to simulate its crash, and then poll another node to access its status, the results are as follows:

```auto
"status" : 503,
  "name" : "node-0",
  "cluster_name" : "es-clusters",
  "version" : {
    "number" : "1.5.0",
    "build_hash" : "581bcd3deec6302b0a0a6ac3935556400efbce15",
    "build_timestamp" : "2023-02-27T02:46:06Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"

```

Obviously the cluster cannot elect a new master, I can see `not enough master nodes` in es-clusters.log.

In addition, when `discovery.zen.minimum_master_nodes > 3` is set when starting the cluster, the cluster cannot start normally, but there is no feedback error in the log, but print `started`.

---

<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, 6:06am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/2 "2023-02-27T06:06:35Z")

</div>

The version you are using to is very, very old and have been EOL a long time. The setting you are referring to was removed in version 7.0 and the cluster now handles it automatically. I would recommend you upgrade to the latest version.

---

<div class="post-metadata">

**Author:** ![zhoumengbo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhoumengbo/32/117773_2.png) [@zhoumengbo](https://discuss.elastic.co/u/zhoumengbo)\
**Post date:** [February 28, 2023, 2:34am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/3 "2023-02-28T02:34:20Z")

</div>

Thank you for your reply. I accidentally noticed this bug and tested it. From a testing standpoint, this may have been problematic at the time.

---

<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 28, 2023, 8:00am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/4 "2023-02-28T08:00:05Z")

</div>

Note that the version you tested came out [almost 8 years ago](https://www.elastic.co/blog/elasticsearch-1-5-0-released) and have been EOL for almost as long.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 28, 2023, 10:10am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/5 "2023-02-28T10:10:38Z")

</div>

Yeah, the _only_ solution to this is to upgrade to a version that is supported. You will never see a patch for this version.

---

<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 28, 2023, 10:11am UTC](https://discuss.elastic.co/t/prevent-setting-minimum-master-nodes-to-more-than-the-current-node-count/326536/6 "2023-03-28T10:11:35Z")

</div>

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