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-7.15

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 issues or node failures. To resolve this issue, you can try restarting the node, ensuring that the network connectivity is stable, or updating the cluster state manually. If the problem persists, consider checking the cluster’s health and configuration settings.

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, 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?