Local node is not master – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.17

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 Elasticsearch operation.

Briefly, this error occurs when the Elasticsearch node you’re trying to perform an operation on is not the master node. In a cluster, only the master node can perform certain operations like creating or deleting indices. To resolve this, you can either perform the operation on the master node or configure your client to automatically redirect requests to the master node. Additionally, ensure that your cluster health is good and all nodes are properly connected. If the master node is down, a new master should be elected by the cluster.

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 ” local node is not master ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: master, node, discovery.

Log Context

Log “local node is not master” class name is MasterFaultDetection.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 return currentState;
 }  @Override
 public void onNoLongerMaster(String source) {
 onFailure(source; new NotMasterException("local node is not master"));
 }  @Override
 public void onFailure(String source; @Nullable Exception e) {
 if (e == null) {


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?