{
  "id": "database/redis-master-link-down",
  "signature": "redis.exceptions.MasterDownError: Error: Master is down or unreachable",
  "signature_zh": "redis.exceptions.MasterDownError：错误：主节点已关闭或无法访问",
  "regex": "Master is down or unreachable",
  "domain": "database",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The Redis client cannot connect to the master node in a replication setup, often due to network partition, master crash, or misconfigured replicaof directive.",
  "root_cause_type": "generic",
  "root_cause_zh": "Redis 客户端无法连接到复制设置中的主节点，通常由于网络分区、主节点崩溃或 replicaof 指令配置错误。",
  "versions": [
    {
      "version": "Redis 6.2.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis 7.0.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Redis 7.2.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restarting only the replica node",
      "why_fails": "If the master is down, restarting the replica does not fix the connection; the replica will still fail to sync.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increasing replica timeout in redis.conf without checking master health",
      "why_fails": "Increasing timeout only delays the error; it does not address the root cause of master unavailability.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check master status from replica: redis-cli -h replica_host INFO replication | grep master_link_status; if down, check master: redis-cli -h master_host PING; restart master if needed: systemctl restart redis-server",
      "success_rate": 0.85,
      "how": "Check master status from replica: redis-cli -h replica_host INFO replication | grep master_link_status; if down, check master: redis-cli -h master_host PING; restart master if needed: systemctl restart redis-server",
      "condition": "",
      "sources": []
    },
    {
      "action": "Promote replica to master in a failover scenario: redis-cli -h replica_host SLAVEOF NO ONE; then reconfigure other replicas to point to the new master.",
      "success_rate": 0.9,
      "how": "Promote replica to master in a failover scenario: redis-cli -h replica_host SLAVEOF NO ONE; then reconfigure other replicas to point to the new master.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "从副本检查主节点状态：redis-cli -h replica_host INFO replication | grep master_link_status；如果为 down，检查主节点：redis-cli -h master_host PING；如果需要，重启主节点：systemctl restart redis-server",
    "在故障转移场景中将副本提升为主节点：redis-cli -h replica_host SLAVEOF NO ONE；然后重新配置其他副本指向新主节点。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://redis.io/docs/latest/operate/oss_and_stack/management/replication/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.85,
  "resolvable": "partial",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}