CLUSTERDOWN: CLUSTERDOWN The cluster is down / Hash slot not served(集群已宕机 / 哈希槽未被服务)
Redis含义
Redis Cluster 未完全正常运行。部分哈希槽没有任何节点提供服务,因此集群拒绝请求。
原因
可达的 master 节点不足、一个或多个槽未分配/未覆盖、失去多数(quorum)、节点崩溃,或在 cluster-require-full-coverage 为 yes 时部分槽不可达。
解决方法
检查集群状态:CLUSTER INFO 和 CLUSTER NODES。恢复宕机的 master,或让副本被提升。重新分配未分配的槽(redis-cli --cluster fix 或 CLUSTER ADDSLOTS)。确认所有槽都已覆盖。如果可以接受部分运行,考虑 cluster-require-full-coverage no。
同一数据库的其他条目
- WRONGPASSWRONGPASS invalid username-password pair or user is disabled(用户名-密码组合无效或用户已禁用)
- READONLYREADONLY You can't write against a read only replica(不能对只读副本执行写入)
- MASTERDOWNMASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'(与 MASTER 的连接已断开,且 replica-serve-stale-data 设为 'no')
- LOADINGLOADING Redis is loading the dataset in memory(Redis 正在将数据集加载到内存中)
- BUSYBUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE(Redis 正忙于运行脚本。只能调用 SCRIPT KILL 或 SHUTDOWN NOSAVE)
- MISCONFMISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk(Redis 已配置为保存 RDB 快照,但当前无法持久化到磁盘)
- CROSSSLOTCROSSSLOT Keys in request don't hash to the same slot(请求中的键未哈希到同一槽)