# ElasticsearchParseException: circular reference detected in pipeline [my_pipeline]

- **ID:** `elasticsearch/ingest-pipeline-circular-reference`
- **Domain:** elasticsearch
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

An ingest pipeline references itself directly or indirectly through other pipelines, creating an infinite loop that Elasticsearch cannot resolve.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.17.0 | active | — | — |
| 8.5.0 | active | — | — |
| 8.10.0 | active | — | — |

## Workarounds

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.** (90% success)
   ```
   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.** (85% success)
   ```
   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.
   ```

## Dead Ends

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