ERR redis network_error ai_generated true

错误:集群节点超时:节点<node_id>不可达已<seconds>秒

ERR Cluster node timeout exceeded: node <node_id> unreachable for <seconds> seconds

ID: redis/cluster-node-timeout-exceeded

其他格式: JSON · Markdown 中文 · English
85%修复率
88%置信度
1证据数
2023-06-20首次发现

版本兼容性

版本状态引入弃用备注
5.0.0 active
6.0.0 active
7.0.0 active

根因分析

集群节点在cluster-node-timeout周期内未响应gossip ping,导致集群将其标记为可能故障并触发故障转移尝试。

English

A cluster node has not responded to gossip pings within the cluster-node-timeout period, causing the cluster to mark it as possibly failed and triggering a failover attempt.

generic

官方文档

https://redis.io/docs/management/scaling/

解决方案

  1. 检查节点间网络连通性:从每个节点运行 `redis-cli -h <node_ip> -p <port> PING`。如果不可达,验证防火墙规则(例如iptables)并确保集群总线端口(基础端口+10000)已开放。
  2. 如果节点过载,减少客户端流量或扩展资源。临时使用 `CLUSTER SET-NODE-TIMEOUT <毫秒>` 增加容限,然后调查根本原因。
  3. 如果节点永久宕机,在所有其他节点上使用 `CLUSTER FORGET <node_id>` 移除它,然后添加替换节点。

无效尝试

常见但无效的做法:

  1. 85% 失败

    Simply restarting the unreachable node without checking network connectivity or firewall rules often leads to the same timeout recurring.

  2. 80% 失败

    Increasing cluster-node-timeout to a very high value delays failure detection and can mask underlying network issues, leading to split-brain scenarios.