# Elastic master node down, how to make slave new master?

**URL:** <https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568>\
**Category:** Elasticsearch\
**Created:** [August 24, 2023, 10:37am UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568 "2023-08-24T10:37:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![webfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/webfr/32/87580_2.png) [@webfr](https://discuss.elastic.co/u/webfr)\
**Post date:** [August 24, 2023, 10:37am UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/1 "2023-08-24T10:37:07Z")

</div>

Hello,  
my master node is currently down since few days, how to make my slave new master if problem on master persists?  
Thanks.

---

<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:** [August 24, 2023, 10:45am UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/2 "2023-08-24T10:45:59Z")

</div>

Elasticsearch does not have slave nodes. Are you referring to a dedicated data node?

Was the node that went down a combined master/data node?

Which version of Elasticsearch are you using?

---

<div class="post-metadata">

**Author:** ![webfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/webfr/32/87580_2.png) [@webfr](https://discuss.elastic.co/u/webfr)\
**Post date:** [August 24, 2023, 11:21am UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/3 "2023-08-24T11:21:36Z")

</div>

Hi @Christian_Dahlqvist,  
the node which went down was configured like this, external data was sent to it only:

#define node 1 as master-eligible:  
node.master: true

#define nodes 2 and 3 as data nodes:  
node.data: true

#ingest mode  
node.ingest: true

and the "alive" node is :

#define node 1 as master-eligible:  
node.master: false

#define nodes 2 and 3 as data nodes:  
node.data: true

#ingest mode  
node.ingest: true

Version: 7.15.1

Thanks for your help 🙂

---

<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:** [August 24, 2023, 11:50am UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/4 "2023-08-24T11:50:04Z")

</div>

That is a really bad cluster configuration and not resilient nor highly available. I would recommend you read [this section in the docs on the topic](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/high-availability-cluster-small-clusters.html). If you have lost all master-eligible nodes it is quite possible you have lost the data and need to start from scratch or [restore from a snapshot](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/snapshot-restore-apis.html). You may be able to use the [elasticsearch-node](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/node-tool.html) tool to restore the cluster and recover your data, but there is no guarantee this will work. If going down this route, make sure you read the documentation carefully.

If you manage to get your cluster and data back, make sure you follow the guidelines in the resiliency docs I linked to to avoid making this type of mistakes in the future.

---

<div class="post-metadata">

**Author:** ![webfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/webfr/32/87580_2.png) [@webfr](https://discuss.elastic.co/u/webfr)\
**Post date:** [August 26, 2023, 2:13pm UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/7 "2023-08-26T14:13:02Z")

</div>

Hello @Christian_Dahlqvist great news, master is back!

How could I improve my architecture? Adding additional node, sending my external data to both nodes...?

Thanks a lot.

---

<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:** [August 26, 2023, 2:29pm UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/8 "2023-08-26T14:29:29Z")

</div>

If you have 3 nodes in the cluster, make sure they are all master eligible. Distribute all requests across all data nodes.

---

<div class="post-metadata">

**Author:** ![webfr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/webfr/32/87580_2.png) [@webfr](https://discuss.elastic.co/u/webfr)\
**Post date:** [August 28, 2023, 2:07pm UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/9 "2023-08-28T14:07:54Z")

</div>

Hi @Christian_Dahlqvist, what about making my secondary node as master too? Thanks.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 28, 2023, 2:32pm UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/10 "2023-08-28T14:32:26Z")

</div>

> [@webfr](#):
>
> what about making my secondary node as master too?

If you have only two nodes, only one can be master elegible, to have a resilient cluster you need at least 3 nodes, a 2 node cluster cannot be resilient and if the master is down, the entire cluster will be down.

---

<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:** [September 25, 2023, 2:33pm UTC](https://discuss.elastic.co/t/elastic-master-node-down-how-to-make-slave-new-master/341568/11 "2023-09-25T14:33:16Z")

</div>

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