Received cluster state from which is also master but with a newer cluster state rejoining to cluster – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.3-1.3

Briefly, this error occurs when there is a discrepancy in the cluster state between different nodes in an Elasticsearch cluster. This could be due to network issues, slow nodes, or configuration problems. To resolve this issue, you can try the following: 1) Check and improve network connectivity between nodes. 2) Ensure all nodes are running the same version of Elasticsearch. 3) Increase the ‘discovery.zen.publish_timeout’ setting to allow slower nodes more time to receive updates. 4) If a node is consistently slow, consider upgrading its hardware or moving it to a faster network connection.

This guide will help you check for common problems that cause the log ” received cluster state from [{}] which is also master but with a newer cluster_state; rejoining to cluster… ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster, discovery and master.

Log Context

Log “received cluster state from [{}] which is also master but with a newer cluster_state; rejoining to cluster…” classname is ZenDiscovery.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             final ClusterState newState = newClusterState;
            clusterService.submitStateUpdateTask("zen-disco-master_receive_cluster_state_from_another_master [" + newState.nodes().masterNode() + "]"; Priority.URGENT; new ProcessedClusterStateUpdateTask() {
                
Override
                public ClusterState execute(ClusterState currentState) {
                    if (newState.version() > currentState.version()) {
                        logger.warn("received cluster state from [{}] which is also master but with a newer cluster_state; rejoining to cluster..."; newState.nodes().masterNode());
                        return rejoin(currentState; "zen-disco-master_receive_cluster_state_from_another_master [" + newState.nodes().masterNode() + "]");
                    } else {
                        logger.warn("received cluster state from [{}] which is also master but with an older cluster_state; telling [{}] to rejoin the cluster"; newState.nodes().masterNode(); newState.nodes().masterNode());

                        try {



 

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?