MASTERDOWN: MASTERDOWN Link with MASTER is down and replica-serve-stale-data is set to 'no'(与 MASTER 的连接已断开,且 replica-serve-stale-data 设为 'no')
Redis含义
副本与 master 之间的连接已断开,由于 replica-serve-stale-data 设为 'no',副本拒绝用过时数据响应请求。
原因
master 节点崩溃或不可达、网络中断/分区、master-副本复制链路断开,或 master 在高负载下无法响应。
解决方法
检查 master 节点的状态和网络连通性。检查复制状态:INFO replication。恢复 master,或通过 Sentinel/Cluster 进行故障转移。如果可以接受提供过时数据,考虑 replica-serve-stale-data yes(注意一致性风险)。使用 Sentinel/Cluster 实现高可用。
同一数据库的其他条目
- NOAUTHNOAUTH Authentication required(需要认证)
- WRONGPASSWRONGPASS invalid username-password pair or user is disabled(用户名-密码组合无效或用户已禁用)
- READONLYREADONLY You can't write against a read only replica(不能对只读副本执行写入)
- CLUSTERDOWNCLUSTERDOWN The cluster is down / Hash slot not served(集群已宕机 / 哈希槽未被服务)
- 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 快照,但当前无法持久化到磁盘)