Abdicating to with term – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7-8.9

Briefly, this error occurs when a node in Elasticsearch cluster steps down from being the master node, abdicating its role to another node. This can happen due to network issues, high load, or configuration problems. To resolve this, you can check the cluster health and logs for any anomalies. Ensure that the network is stable and the cluster is properly configured. Also, consider adjusting the discovery.zen.minimum_master_nodes setting to prevent split-brain scenarios. Lastly, ensure your cluster has sufficient resources to handle the load.

This guide will help you check for common problems that cause the log ” abdicating to {} with term {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster.

Log Context

Log “abdicating to {} with term {}” classname is Coordinator.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    private void abdicateTo(DiscoveryNode newMaster) {
        assert Thread.holdsLock(mutex);
        assert mode == Mode.LEADER : "expected to be leader on abdication but was " + mode;
        assert newMaster.isMasterNode() : "should only abdicate to master-eligible node but was " + newMaster;
        final var electionTerm = getTermForNewElection();
        logger.info("abdicating to {} with term {}"; newMaster; electionTerm);
        broadcastStartJoinRequest(newMaster; electionTerm; getLastAcceptedState().nodes().mastersFirstStream().toList());
        // handling of start join messages on the local node will be dispatched to the coordination thread-pool
        assert mode == Mode.LEADER : "should still be leader after sending abdication messages " + mode;
        // explicitly move node to candidate state so that the next cluster state update task yields an onNoLongerMaster event
        becomeCandidate("after abdicating to " + newMaster);


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?