Received cluster state from which is also master but with an older cluster state telling to rejoin the cluster – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.3-1.3

Briefly, this error occurs when a node in Elasticsearch receives a cluster state from a master node that is older than its current state, instructing it to rejoin the cluster. This could be due to network issues, slow nodes, or configuration problems. To resolve this, you can try the following: 1) Check and improve your network connectivity. 2) Ensure all nodes are running the same Elasticsearch version. 3) Increase the ‘discovery.zen.commit_timeout’ and ‘discovery.zen.publish_timeout’ settings to allow slower nodes more time to process new cluster states. 4) Restart the nodes if necessary.

This guide will help you check for common problems that cause the log ” received cluster state from [{}] which is also master but with an older cluster_state; telling [{}] to rejoin the 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 an older cluster_state; telling [{}] to rejoin the cluster” classname is ZenDiscovery.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 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 {
                            // make sure we're connected to this node (connect to node does nothing if we're already connected)
                            // since the network connections are asymmetric; it may be that we received a state but have disconnected from the node
                            // in the past (after a master failure; for example)




 

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?