Discovered 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: 6.8-6.8

Briefly, this error occurs when a node in an Elasticsearch cluster has an outdated cluster state and is trying to rejoin the cluster. This can happen due to network partitions or slow nodes. To resolve this issue, you can try the following: 1) Restart the node to force it to get the latest cluster state. 2) Check the network connectivity between the nodes. 3) Ensure all nodes are running the same version of Elasticsearch. 4) Increase the ‘discovery.zen.commit_timeout’ and ‘discovery.zen.publish_timeout’ settings to give slow nodes more time to update their cluster state.

This guide will help you check for common problems that cause the log ” Discovered [{}] 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 “Discovered [{}] 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 :

 
        if (otherClusterStateVersion > localClusterState.version()) {
            rejoin("zen-disco-discovered another master with a new cluster_state [" + otherMaster + "][" + reason + "]");
        } else {
            // TODO: do this outside mutex
            logger.warn("discovered [{}] which is also master but with an older cluster_state; telling [{}] to rejoin the cluster ([{}])";
                otherMaster; otherMaster; reason);
            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?