# ERR Node epoch conflict: node 127.0.0.1:7001 has epoch 100, but another node 127.0.0.1:7002 claims same epoch

- **ID:** `redis/cluster-node-epoch-conflict`
- **Domain:** redis
- **Category:** runtime_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two Redis cluster nodes have the same epoch number, causing a conflict in cluster state synchronization and preventing proper failover or configuration updates.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 6.2 | active | — | — |
| 7.0 | active | — | — |
| 7.2 | active | — | — |

## Workarounds

1. **Use CLUSTER RESET on one of the conflicting nodes to reset its epoch to 0, then rejoin the cluster. Example: redis-cli -h 127.0.0.1 -p 7001 CLUSTER RESET HARD** (85% success)
   ```
   Use CLUSTER RESET on one of the conflicting nodes to reset its epoch to 0, then rejoin the cluster. Example: redis-cli -h 127.0.0.1 -p 7001 CLUSTER RESET HARD
   ```
2. **Force the cluster to rebalance epochs by failing over the master on the node with the conflicting epoch. Example: CLUSTER FAILOVER FORCE on a replica of that master.** (80% success)
   ```
   Force the cluster to rebalance epochs by failing over the master on the node with the conflicting epoch. Example: CLUSTER FAILOVER FORCE on a replica of that master.
   ```
3. **Manually update the nodes.conf file on one node to assign a unique epoch (e.g., increment by 1) and restart the node.** (75% success)
   ```
   Manually update the nodes.conf file on one node to assign a unique epoch (e.g., increment by 1) and restart the node.
   ```

## Dead Ends

- **Manually set the epoch on one node using CLUSTER SET-CONFIG-EPOCH with a random value.** — This can cause further conflicts if not coordinated; the cluster may reject the change if the epoch is lower than the current one. (60% fail)
- **Restart both conflicting nodes simultaneously.** — The epochs are stored in the nodes.conf file; restarting does not change them, so the conflict persists. (80% fail)
- **Delete the nodes.conf file on one node and let it rejoin the cluster.** — This can cause data loss and disrupt cluster topology; the rejoining node may still get a conflicting epoch. (50% fail)
