# SENTINEL：故障转移中止 - 未找到主节点 'mymaster' 的候选副本

- **ID:** `redis/sentinel-failover-no-good-replica`
- **领域:** redis
- **类别:** runtime_error
- **错误码:** `SENTINEL`
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

Sentinel 无法提升任何副本，因为所有副本要么过时（数据太旧）、宕机，要么优先级为 0。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| redis 6.2 | active | — | — |
| redis 7.0 | active | — | — |
| redis 7.2 | active | — | — |

## 解决方案

1. ```
   Check replica replication lag and priority:
INFO REPLICATION on each replica
Ensure at least one replica has lag < sentinel-replica-down-after-milliseconds and priority > 0.
If lag is high, wait for sync or manually trigger replication from master.
   ```
2. ```
   Adjust replica priority to 1 (default) on all replicas:
CONFIG SET replica-priority 1
This ensures they are eligible for promotion.
   ```

## 无效尝试

- **** — Timeout increase does not fix stale or down replicas; failover will still abort. (65% 失败率)
- **** — If the replica is too stale, promoting it can cause data loss and inconsistency. (75% 失败率)
- **** — Restarting sentinels does not change replica state; they will still see the same condition. (80% 失败率)
