--- title: "Pipeline ID 不能定义空的 on_failure 选项 – 如何解决此 Elasticsearch 异常" date: 2026-01-07 lastmod: 2026-01-07 description: "当 Elasticsearch 摄取管道配置了 on_failure 选项但未为其定义任何操作时,会出现此错误。" tags: ["管道", "异常处理", "摄取管道"] summary: " 版本: 6.8-8.9 简而言之,当 Elasticsearch 摄取管道配置了"on_failure"选项,但未为其定义任何操作时,就会出现此错误。“on_failure"选项用于指定在处理过程中发生错误时应采取哪些操作。要解决此问题,如果不需要"on_failure"选项,可以将其删除;或者为其定义至少一个操作。操作可能包括记录错误、发送通知或尝试以不同方式处理数据。 日志上下文 # 日志"pipeline [” + id + “] cannot have an empty on_failure option defined"类名是 Pipeline.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考: + "] doesn't support one or more provided configuration parameters " + Arrays.toString(config.keySet().toArray()) ); } if (onFailureProcessorConfigs != null && onFailureProcessors.isEmpty()) { throw new ElasticsearchParseException("pipeline [" + id + "] cannot have an empty on_failure option defined"); } CompoundProcessor compoundProcessor = new CompoundProcessor(false; processors; onFailureProcessors); return new Pipeline(id; description; version; metadata; compoundProcessor); } " --- > **版本:** 6.8-8.9 简而言之,当 Elasticsearch 摄取管道配置了"on_failure"选项,但未为其定义任何操作时,就会出现此错误。"on_failure"选项用于指定在处理过程中发生错误时应采取哪些操作。要解决此问题,如果不需要"on_failure"选项,可以将其删除;或者为其定义至少一个操作。操作可能包括记录错误、发送通知或尝试以不同方式处理数据。 日志上下文 ----------- 日志"pipeline [" + id + "] cannot have an empty on\_failure option defined"类名是[Pipeline.java。](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/) 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考: ```java + "] doesn't support one or more provided configuration parameters " + Arrays.toString(config.keySet().toArray()) ); } if (onFailureProcessorConfigs != null && onFailureProcessors.isEmpty()) { throw new ElasticsearchParseException("pipeline [" + id + "] cannot have an empty on_failure option defined"); } CompoundProcessor compoundProcessor = new CompoundProcessor(false; processors; onFailureProcessors); return new Pipeline(id; description; version; metadata; compoundProcessor); } ```