--- title: "未找到可修改设置的Watcher – 如何解决此Elasticsearch异常" date: 2026-03-21 lastmod: 2026-03-21 description: "当尝试在不存在的Elasticsearch watcher上修改设置时会出现此错误。Watcher用于Elasticsearch中的告警功能。该错误表示系统找不到任何可应用修改的watcher。" tags: ["Elasticsearch", "Watcher", "异常处理", "告警"] summary: " 版本: 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() } " --- > **版本:** 8.8-8.9 简而言之,当您尝试在不存在的Elasticsearch watcher上修改设置时会出现此错误。Watcher用于Elasticsearch中的告警功能。该错误表示系统找不到任何可应用修改的watcher。要解决此问题,您可以创建新的watcher,或者确保现有的watcher被正确识别且可访问。此外,请检查您的权限以确保您拥有修改watcher设置所需的必要权限。 日志上下文 ----------- 日志"no Watches found on which to modify settings"的类名是[TransportUpdateWatcherSettingsAction.java。](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/) 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考: ```java ActionListener 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() } ```