版本: 6.8-7.15
简要来说,当 Elasticsearch 由于无效状态无法解析监视器 (watch) 时会发生此错误。这可能是由于语法错误、缺少必填字段或监视器定义中存在无效数据导致的。要解决此问题,您可以:1) 检查监视器定义中是否存在语法错误或缺少必填字段。2) 验证监视器中接收的数据。3) 如果监视器最近被更新过,尝试恢复到以前的版本以查看错误是否持续存在。4) 重启 Elasticsearch 以清除任何临时问题。
日志上下文 #
日志 “could not parse watch [{}]. watch status in invalid state. action [{}]” 的类名是 WatchParser.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
if (status != null) {
// verify the status is valid (that every action indeed has a status)
for (ActionWrapper action : actions) {
if (status.actionStatus(action.id()) == null) {
throw new ElasticsearchParseException("could not parse watch [{}]. watch status in invalid state. action [{}] " +
"status is missing", id, action.id());
}
}
} else {
// we need to create the initial statuses for the actions





