SENTINEL redis runtime_error ai_generated true

SENTINEL: failover aborted - no good replica found for master 'mymaster'

ID: redis/sentinel-failover-no-good-replica

Also available as: JSON · Markdown · 中文
80%Fix Rate
84%Confidence
1Evidence
2024-01-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
redis 6.2 active — — —
redis 7.0 active — — —
redis 7.2 active — — —

Root Cause

Sentinel could not promote any replica because all replicas are either stale (data too old), down, or have priority 0.

generic

中文

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

Official Documentation

https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/

Workarounds

  1. 85% success 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.
    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. 90% success Adjust replica priority to 1 (default) on all replicas: CONFIG SET replica-priority 1 This ensures they are eligible for promotion.
    Adjust replica priority to 1 (default) on all replicas:
    CONFIG SET replica-priority 1
    This ensures they are eligible for promotion.

中文步骤

  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.

Dead Ends

Common approaches that don't work:

  1. 65% fail

    Timeout increase does not fix stale or down replicas; failover will still abort.

  2. 75% fail

    If the replica is too stale, promoting it can cause data loss and inconsistency.

  3. 80% fail

    Restarting sentinels does not change replica state; they will still see the same condition.