Autoscaling policy with name name does not exist – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-8.9

Briefly, this error occurs when an attempt is made to access or modify an autoscaling policy in Elasticsearch that does not exist. The policy name specified in the request is not found in the Elasticsearch cluster. To resolve this issue, you can either create a new autoscaling policy with the specified name or ensure that the correct existing policy name is used in the request. Also, check for any typographical errors in the policy name.

This guide will help you check for common problems that cause the log ” autoscaling policy with name [” + name + “] does not exist ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “autoscaling policy with name [” + name + “] does not exist” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 // we will reject the request below when we try to look up the policy by name
 currentMetadata = AutoscalingMetadata.EMPTY;
 boolean wildcard = Regex.isSimpleMatchPattern(name);
 if (wildcard == false && currentMetadata.policies().containsKey(name) == false) {
 throw new ResourceNotFoundException("autoscaling policy with name [" + name + "] does not exist");
 }  final SortedMap newPolicies = new TreeMap<>(currentMetadata.policies());
 if (wildcard) {
 newPolicies.keySet().removeIf(key -> Regex.simpleMatch(name; key));