Node currentNodes getLocalNode not master for join request – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when a node in an Elasticsearch cluster tries to join but the current node is not the master node. This could be due to network issues, incorrect configuration, or a split-brain scenario. To resolve this, ensure that the network connectivity between nodes is stable. Check the cluster’s settings and ensure the correct master node is specified. Also, consider enabling the ‘discovery.zen.minimum_master_nodes’ setting to prevent split-brain situations.

This guide will help you check for common problems that cause the log ” Node [” + currentNodes.getLocalNode() + “] not master for join request ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node, cluster.

Log Context

Log “Node [” + currentNodes.getLocalNode() + “] not master for join request” class name is NodeJoinExecutor.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 } else if (currentNodes.isLocalNodeElectedMaster()) {
 assert initialState.term() == term : "term should be stable for the same master";
 newState = ClusterState.builder(initialState);
 } else {
 logger.trace("processing node joins; but we are not the master. current master: {}"; currentNodes.getMasterNode());
 throw new NotMasterException("Node [" + currentNodes.getLocalNode() + "] not master for join request");
 }  DiscoveryNodes.Builder nodesBuilder = DiscoveryNodes.builder(newState.nodes());
 Map transportVersions = new HashMap<>(newState.transportVersions());

 

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?