WRONGPASS error
The username or password is wrong, or the user is disabled.
Redis returns this error from AUTH or HELLO when it can't authenticate you. For security, the message is the same in each of these cases:
- The password is wrong.
- The user doesn't exist.
- The user exists, but it's disabled.
WRONGPASS invalid username-password pair or user is disabled.
In client libraries
| Client library | Exception or error type | Message |
|---|---|---|
| redis-py | AuthenticationError |
invalid username-password pair or user is disabled. |
| Jedis | JedisAccessControlException |
WRONGPASS invalid username-password pair or user is disabled.AUTH with a password for a user that has none returns ERR AUTH <password> called without any password configured for the default user…, which is a JedisDataException. |
| node-redis | SimpleErrorTest with err.message.startsWith('WRONGPASS') |
WRONGPASS invalid username-password pair or user is disabled. |
| Lettuce The async API wraps the exception in an ExecutionException (get()) or a CompletionException (join()). |
RedisConnectionException |
Unable to connect to <host>/<unresolved>:<port>The cause is a RedisCommandExecutionException with the server's WRONGPASS message. AUTH with a password for a user that has none raises RedisCommandExecutionException with the ERR AUTH <password> called without any password configured… message, and no RedisConnectionException. |
| go-redis | redis.ErrorTest with redis.IsAuthError(err) |
WRONGPASS invalid username-password pair or user is disabled.AUTH with a password for a user that has none returns ERR AUTH <password> called without any password configured…, which has no check of its own. |
| ioredis | ReplyErrorTest with err.message.startsWith('WRONGPASS') |
WRONGPASS invalid username-password pair or user is disabled.AUTH with a password for a user that has none returns ERR AUTH <password> called without any password configured…. |
| StackExchange.Redis NRedisStack uses StackExchange.Redis, so it raises the same exceptions. The sync and async APIs raise the same exceptions. |
RedisConnectionException |
It was not possible to connect to the redis server(s). There was an authentication failure; check that passwords (or client certificates) are configured correctly: (RedisServerException) SimpleError: WRONGPASS invalid username-password pair or user is disabled.AUTH with a password for a user that has none raises RedisServerException with the message ERR AUTH <password> called without any password configured…. |
| Predis | Predis\Connection\ConnectionException |
Failed: WRONGPASS invalid username-password pair or user is disabled. [tcp://<host>:<port>]AUTH with a password for a user that has none raises Predis\Response\ServerException with the message ERR AUTH <password> called without any password configured…. |
| redis-rb | Redis::CannotConnectError |
WRONGPASS invalid username-password pair or user is disabled. (redis://<host>:<port>)AUTH with a password for a user that has none raises Redis::CommandError with the message ERR AUTH <password> called without any password configured…. |
| redis-rs The sync and async APIs raise the same errors. |
ErrorKind::AuthenticationFailed |
Password authentication failed - AuthenticationFailedAUTH with a password for a user that has none returns ErrorKind::Server(ServerErrorKind::ResponseError) with the message ResponseError: AUTH <password> called without any password configured…. |
How to fix it
- Check the credentials that your app uses. Look for a password from a different environment, a space or newline at the end of the password, or a missing username. Without a username,
AUTHchecks the password of thedefaultuser. - Check that the user exists and is enabled. An administrator can list the users with
ACL USERS, and see a user's settings withACL GETUSER. A disabled user has theoffflag. To enable it, runACL SETUSER <username> on.
You get a different error when you send a password to a server that doesn't have one:
ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
In that case, either remove the password from your app's configuration, or set a password on the server. See access control lists (ACLs).