redis config_error ai_generated true

节点超时配置不匹配:期望 15000,但从节点 127.0.0.1:7001 收到 30000

ERR Node timeout mismatch: expected 15000 but got 30000 from node 127.0.0.1:7001

ID: redis/cluster-node-timeout-mismatch

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

版本兼容性

版本状态引入弃用备注
Redis 7.0.0 active
Redis 7.2.4 active
Redis 6.2.14 active

根因分析

Redis 集群节点的 cluster-node-timeout 值不一致,阻止它们形成一致的集群。

English

Redis cluster nodes have inconsistent cluster-node-timeout values, preventing them from forming a coherent cluster.

generic

官方文档

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

解决方案

  1. Set consistent cluster-node-timeout on all nodes by editing redis.conf: cluster-node-timeout 15000. Then restart each node gracefully: redis-cli -p 7001 SHUTDOWN NOSAVE; redis-server /path/to/redis.conf. Verify with CLUSTER INFO.
  2. Use CONFIG SET cluster-node-timeout 15000 on each node, then CONFIG REWRITE to persist. Example: redis-cli -p 7001 CONFIG SET cluster-node-timeout 15000 && redis-cli -p 7001 CONFIG REWRITE.
  3. If nodes are already in a failed state, use CLUSTER FORGET to remove misconfigured nodes, fix their config, and rejoin them with CLUSTER MEET.

无效尝试

常见但无效的做法:

  1. 95% 失败

    Restarting doesn't change configuration values. The mismatch is in the config files, not a transient state.

  2. 80% 失败

    This command sets the config epoch for failover, not the cluster-node-timeout. It doesn't address the timeout mismatch.

  3. 70% 失败

    CONFIG SET changes the runtime value but may not persist after restart. Also, the cluster may reject the change if nodes are already in a mixed state.