📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.4-7.15

简而言之,当Elasticsearch无法找到指定的快照生命周期策略时会出现此错误。这可能是由于策略被删除、尚未创建,或者策略名称中存在拼写错误。要解决此问题,您可以使用GET生命周期策略API验证策略是否存在。如果不存在,请使用PUT生命周期策略API创建新策略。如果是拼写错误,请在您的请求中更正策略名称。

日志上下文 #

日志"snapshot lifecycle policy or policies {} not found"的类名是 TransportGetSnapshotLifecycleAction.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

.collect(Collectors.toList());
 if (lifecycles.size() == 0) {
 if (request.getLifecycleIds().length == 0) {
 listener.onResponse(new GetSnapshotLifecycleAction.Response(Collections.emptyList()));
 } else {
 listener.onFailure(new ResourceNotFoundException("snapshot lifecycle policy or policies {} not found";
 Arrays.toString(request.getLifecycleIds())));
 }
 } else {
 listener.onResponse(new GetSnapshotLifecycleAction.Response(lifecycles));
 }