ERR WAIT cannot be used with replica instances: WAIT cannot be used with replica instances(WAIT 不能用于副本实例)
Redis含义
在副本(replica/slave)实例上运行了 WAIT。WAIT 用于等待写入到达指定数量的副本,只在主节点(master)上有意义;不能在副本上使用。
原因
应用误通过副本连接发送了 WAIT。通常是因为连接被路由到只读副本,或在角色变更(故障转移)后客户端仍连接着副本。
解决方法
只向主节点发送 WAIT。确保客户端/代理配置将写入和 WAIT 调用路由到 master。在故障转移后检测角色变化,并将连接重定向到新的主节点(可以用 ROLE 命令确认角色)。
同一数据库的其他条目
- ERR Protocol error: invalid multibulk lengthProtocol error: invalid multibulk length(协议错误:无效的 multibulk 长度)
- ERR Number of keys can't be greater than number of argsEVAL/EVALSHA: numkeys exceeds argument count(EVAL/EVALSHA:numkeys 超过参数数量)
- ERR WATCH inside MULTI is not allowedWATCH inside MULTI is not allowed(不允许在 MULTI 中使用 WATCH)
- ERR Background append only file rewriting already in progressAOF rewrite already in progress(AOF 重写已在进行中)
- IOERR error or timeout reading from target instanceMIGRATE: I/O error or timeout to target(MIGRATE:与目标之间发生 I/O 错误或超时)
- ERR Error compiling script (new function)Error compiling Lua script(编译 Lua 脚本出错)
- ERR FAILOVER requires connected replicas.FAILOVER requires connected replicas(FAILOVER 需要已连接的副本)