ERR Client sent AUTH, but no password is set: ERR AUTH <password> called without any password configured for the default user (Redis 6+) / ERR Client sent AUTH, but no password is set (Redis <6)(调用了 AUTH,但服务器未配置密码)
Redis含义
客户端尝试用 AUTH 认证,但服务器上未定义密码(requirepass)或 ACL 密码。由于没有可供验证的凭据,AUTH 被拒绝。这种情况下 Redis 6+ 返回 "ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?";"Client sent AUTH, but no password is set" 是 Redis 6 之前的消息。
原因
服务器上 requirepass 为空、客户端不必要地发送了 AUTH、连接字符串中定义了密码而服务器没有设置密码,或配置不一致。
解决方法
如果服务器不需要密码,从客户端移除 AUTH 命令/密码设置。如果需要密码保护,在服务器上设置 requirepass(CONFIG SET requirepass password),或为 ACL 用户定义密码。使客户端与服务器的配置保持一致。
同一数据库的其他条目
- NOREPLICASNOREPLICAS Not enough good replicas to write(没有足够的正常副本可供写入)
- ERR This instance has cluster support disabledERR This instance has cluster support disabled(此实例已禁用集群支持)
- ERR unknown subcommandERR unknown subcommand or wrong number of arguments(未知子命令或参数数量错误)
- ERR DEBUG command not allowedDEBUG command not allowed(不允许使用 DEBUG 命令)
- ERR Can't save in background: fork failedBackground save failed: fork failed(后台保存失败:fork 失败)
- NOPROTO unsupported protocol versionUnsupported RESP protocol version(不支持的 RESP 协议版本)
- ERR Unknown option or number of arguments for CONFIG SETUnknown option or number of arguments for CONFIG SET (older versions: Unsupported CONFIG parameter)(CONFIG SET 的选项未知或参数数量错误)