Master left – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.17

Briefly, this error occurs when the master node in an Elasticsearch cluster becomes unavailable or disconnects. This could be due to network issues, resource constraints, or the master node crashing. To resolve this issue, you can ensure the master node is running and reachable, check for network connectivity issues, or increase resources if they are insufficient. Additionally, consider configuring your cluster with multiple master-eligible nodes to prevent a single point of failure.

This guide will help you check for common problems that cause the log ” master left [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: master, discovery.

Log Context

Log “master left [{}]” class name is ZenDiscovery.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 logger.info(() -> new ParameterizedMessage("master_left [{}]; reason [{}]"; masterNode; reason); cause);  synchronized (stateMutex) {
 if (localNodeMaster() == false && masterNode.equals(committedState.get().nodes().getMasterNode())) {
 // flush any pending cluster states from old master; so it will not be set as master again
 pendingStatesQueue.failAllStatesAndClear(new ElasticsearchException("master left [{}]"; reason));
 rejoin("master left (reason = " + reason + ")");
 }
 }
 }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?