Discovered which is also master but with an older cluster state telling to rejoin the cluster – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your OpenSearch operation.

Briefly, this error occurs when there are multiple master nodes in an OpenSearch cluster and one of them has an older cluster state. This can happen due to network partitioning or other issues causing the cluster state to be out of sync. To resolve this, you can manually force the node with the older state to rejoin the cluster. Alternatively, you can restart the node to trigger a new master election. Also, ensure that your network is stable to prevent such issues in the future.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

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 OpenSearch concepts: master, cluster, discovery.

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

Get expert answers on Elasticsearch/OpenSearch