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

版本: 8.8-8.9

简而言之,当您尝试在不存在的Elasticsearch watcher上修改设置时会出现此错误。Watcher用于Elasticsearch中的告警功能。该错误表示系统找不到任何可应用修改的watcher。要解决此问题,您可以创建新的watcher,或者确保现有的watcher被正确识别且可访问。此外,请检查您的权限以确保您拥有修改watcher设置所需的必要权限。

日志上下文 #

日志"no Watches found on which to modify settings"的类名是 TransportUpdateWatcherSettingsAction.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

ActionListener<Void> listener
) {
    final IndexMetadata watcherIndexMd = state.metadata().index(WATCHER_INDEX_NAME);
    if (watcherIndexMd == null) {
        // Index does not exist; so fail fast
        listener.onFailure(new ResourceNotFoundException("no Watches found on which to modify settings"));
        return;
    }
    final Settings newSettings = Settings.builder().loadFromMap(request.settings()).build();
    final UpdateSettingsClusterStateUpdateRequest clusterStateUpdateRequest = new UpdateSettingsClusterStateUpdateRequest().indices(
        new Index[] { watcherIndexMd.getIndex() }