Received a cluster state uuid v from a different master than the current one rejecting received current – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 5-5

Briefly, this error occurs when there is a mismatch between the cluster state UUIDs from different master nodes in an Elasticsearch cluster. This could be due to network partitioning, causing nodes to elect a new master while the old one is still active. To resolve this, ensure that only one master node is active at a time. You can also increase the ‘discovery.zen.minimum_master_nodes’ setting to a majority of your master-eligible nodes to prevent split-brain scenarios. Additionally, check your network connectivity to prevent partitions.

This guide will help you check for common problems that cause the log ” received a cluster state (uuid[{}]/v[{}]) from a different master than the current one; rejecting (received {}; current {}) ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, discovery, master and queue.

Log Context

Log “received a cluster state (uuid[{}]/v[{}]) from a different master than the current one; rejecting (received {}; current {})” classname is PendingClusterStatesQueue.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             final DiscoveryNode pendingMasterNode = pendingState.nodes().getMasterNode();
            if (Objects.equals(currentMaster; pendingMasterNode) == false) {
                contextsToRemove.add(pendingContext);
                if (pendingContext.committed()) {
                    // this is a committed state ; warn
                    logger.warn("received a cluster state (uuid[{}]/v[{}]) from a different master than the current one; rejecting (received {}; current {})";
                            pendingState.stateUUID(); pendingState.version();
                            pendingMasterNode; currentMaster);
                    pendingContext.listener.onNewClusterStateFailed(
                            new IllegalStateException("cluster state from a different master than the current one; rejecting (received " + pendingMasterNode + "; current " + currentMaster + ")")
                    );




 

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?