# ES 2 master node configuration

**URL:** https://discuss.elastic.co/t/es-2-master-node-configuration/219175
**Category:** Elasticsearch
**Created:** [February 13, 2020, 9:42am UTC](https://discuss.elastic.co/t/es-2-master-node-configuration/219175 "2020-02-13T09:42:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tushar\_Khanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_khanna/32/62618_2.png) [@Tushar\_Khanna](https://discuss.elastic.co/u/Tushar_Khanna)
#### Post date: [February 13, 2020, 9:42am UTC](https://discuss.elastic.co/t/es-2-master-node-configuration/219175/1 "2020-02-13T09:42:02Z")

</div>

Hi Team,

There are 2 master eligible nodes with below configuration. Node 1 (only master) , Node2(master and data and belonging to one of the data center) , in addition there are 4 more only data nodes belonging to one of the data center

node1  
cluster.name: [elkprod.com](http://elkprod.com)  
node.name: node1  
node.master: true  
node.voting\_only: false  
node.data: false  
network.host: 10.04.007.14  
http.port: 61049  
cluster.routing.allocation.awareness.attributes: rack  
cluster.routing.allocation.awareness.force.rack.values: reigate,stalbans  
discovery.seed\_hosts: ["10.04.007.14", "10.03.009.184"]  
cluster.initial\_master\_nodes: ["node2","node1"]  
transport.port: 61100-61300

node2  
cluster.name: [elkprod.com](http://elkprod.com)  
node.name: node2  
node.master: true  
node.voting\_only: false  
node.data: true  
network.host: 10.03.009.184  
http.port: 61049  
node.attr.rack: stalbans  
cluster.routing.allocation.awareness.attributes: rack  
cluster.routing.allocation.awareness.force.rack.values: reigate,stalbans  
discovery.seed\_hosts: ["10.04.007.14", "10.03.009.184"]  
cluster.initial\_master\_nodes: ["node2","node1"]  
transport.port: 61100-61300

only node1 is acting as master node, even if I bring node1 down, node2 is not elected as master node.

Am I missing something in configuration. Please help. Thanks.

Regards,  
Tushar Khanna

---

<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 13, 2020, 9:45am UTC](https://discuss.elastic.co/t/es-2-master-node-configuration/219175/2 "2020-02-13T09:45:28Z")

</div>

Master election requires a strict majority of master eligible nodes to agree a new master. With only 2 master eligible nodes in the cluster both therefore have to be available. You should always have at least 3 master eligible nodes in a cluster if you want to be able to have a green cluster even if one node goes down.

---

<div class="post-metadata">

### Author: ![Tushar\_Khanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_khanna/32/62618_2.png) [@Tushar\_Khanna](https://discuss.elastic.co/u/Tushar_Khanna)
#### Post date: [February 14, 2020, 2:52pm UTC](https://discuss.elastic.co/t/es-2-master-node-configuration/219175/3 "2020-02-14T14:52:21Z")

</div>

It worked after I made 3 nodes as master-eligible. Thanks for your 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 13, 2020, 2:52pm UTC](https://discuss.elastic.co/t/es-2-master-node-configuration/219175/4 "2020-03-13T14:52:23Z")

</div>

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