# Elasticsearch解析异常：在管道 [my_pipeline] 中检测到循环引用

- **ID:** `elasticsearch/ingest-pipeline-circular-reference`
- **领域:** elasticsearch
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

一个摄取管道直接或间接通过其他管道引用自身，创建了Elasticsearch无法解析的无限循环。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 7.17.0 | active | — | — |
| 8.5.0 | active | — | — |
| 8.10.0 | active | — | — |

## 解决方案

1. ```
   Use the Cluster State API to manually remove the pipeline definition from the cluster state: PUT /_cluster/state/metadata?pretty and then patch the metadata to delete the circular pipeline entry. Alternatively, use the following curl command to delete the pipeline after clearing the reference: curl -X DELETE 'localhost:9200/_ingest/pipeline/my_pipeline' but ensure no other pipeline references it first.
   ```
2. ```
   Temporarily disable the pipeline by setting its version to a negative value via the Cluster Settings API: PUT /_cluster/settings { 'transient': { 'ingest.pipelines.my_pipeline.enabled': false } } and then fix the pipeline definition.
   ```

## 无效尝试

- **** — Restarting Elasticsearch nodes does not break the circular pipeline definition; the pipeline configuration persists in the cluster state. (95% 失败率)
- **** — Deleting the pipeline by name fails because the circular reference prevents the pipeline from being parsed or removed cleanly. (80% 失败率)
