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

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

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?

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 :slight_smile:

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. 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. You may be able to use the elasticsearch-node 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.

1 Like

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.

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

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

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.

1 Like

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