Request to refresh anomaly detector memory requirement on non-master node – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.12-8.4

Briefly, this error occurs when a request to refresh the memory requirement of an anomaly detector is made on a non-master node in Elasticsearch. Elasticsearch designates one node as the master to control the cluster. To resolve this, ensure that the request is sent to the master node. You can do this by checking the cluster health API to identify the master node. Alternatively, you can configure your client to automatically redirect requests to the master node. Also, ensure that your cluster is properly configured and all nodes are correctly identified.

This guide will help you check for common problems that cause the log ” Request to refresh anomaly detector memory requirement on non-master node ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: node, memory, request, refresh, plugin.

Log Context

Log “Request to refresh anomaly detector memory requirement on non-master node” class name is MlMemoryTracker.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 * @param listener Receives the job's memory requirement; or null *                 if it cannot be calculated.
 */
 public void refreshAnomalyDetectorJobMemory(String jobId; ActionListener listener) {
 if (isMaster == false) {
 listener.onFailure(new NotMasterException("Request to refresh anomaly detector memory requirement on non-master node"));
 return;
 }  // The phaser prevents searches being started after the memory tracker's stop() method has returned
 // Note: `phase` is incremented if cache is reset via the feature reset API

 

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?