Briefly, this error occurs when a request to retrieve the memory assignment of a trained model is made from a non-master node in Elasticsearch. This could be due to misconfiguration or network issues. To resolve this, ensure that the request is made from the master node. If the error persists, check the cluster health and network connectivity. Also, verify the node roles and ensure that the master node is properly configured and operational.
This guide will help you check for common problems that cause the log ” Request to get trained model assignment memory not on master node; modelId was [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, master, memory, request.
Log Context
Log “Request to get trained model assignment memory not on master node; modelId was [{}]” classname is MlMemoryTracker.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
* @return The memory requirement of the trained model task specified by {@code modelId};
* or null
if it cannot be found.
*/
public Long getTrainedModelAssignmentMemoryRequirement(String modelId) {
if (isMaster == false) {
logger.warn("Request to get trained model assignment memory not on master node; modelId was [{}]"; modelId);
return null;
}
return Optional.ofNullable(TrainedModelAssignmentMetadata.fromState(clusterService.state()).allAssignments().get(modelId))
.map(TrainedModelAssignment::getTaskParams)