Request to refresh anomaly detector memory requirements 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 requirements of an anomaly detector is made on a non-master node in Elasticsearch. Elasticsearch requires such operations to be performed on the master node. To resolve this issue, you can either reroute the request to the master node or change the node to a master node. Additionally, ensure that your cluster health is green and all nodes are properly connected to avoid such issues.

This guide will help you check for common problems that cause the log ” Request to refresh anomaly detector memory requirements 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 requirements on non-master node” class name is MlMemoryTracker.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 *                 or null if it cannot be calculated.
 */
 public void refreshAnomalyDetectorJobMemoryAndAllOthers(String jobId; ActionListener listener) {  if (isMaster == false) {
 listener.onFailure(new NotMasterException("Request to refresh anomaly detector memory requirements on non-master node"));
 return;
 }  // Skip the provided job ID in the main refresh; as we unconditionally do it at the end.
 // Otherwise it might get refreshed twice; because it could have both a job task and a snapshot upgrade task.

 

 [ratemypost]