"NOAUTH Authentication required" is Redis telling a client that this connection has not authenticated and the server requires it. Its sibling WRONGPASS means the client did try AUTH, but the username and password did not match an enabled user. Both texts are the same in Redis and in Valkey, which forked from it.
127.0.0.1:6379> GET session:42
(error) NOAUTH Authentication required.
127.0.0.1:6379> AUTH app wrong-secret
(error) WRONGPASS invalid username-password pair or user is disabled.
When Redis demands authentication
Since Redis 6 every connection belongs to an ACL user. By default there is one user, default, configured as on nopass ~* &* +@all, and with nopass on the default user new connections are authenticated automatically, without any AUTH (ACL guide). In the source the rule is exactly that: authentication is required when the default user is not nopass or is disabled, and the connection has not authenticated yet. Until then every command except AUTH, HELLO and a few others gets NOAUTH.
So NOAUTH starts the moment one of these happens:
requirepassis set. Since Redis 6 it is a compatibility layer that sets the password of the default user (redis.conf).- The default user gets a password through
ACL SETUSER default >..., or losesnopasswithresetpass. - The default user is switched
off. Then every new connection starts unauthenticated and must sendAUTHorHELLOwith credentials. Connections that were already authenticated keep working (ACL rules), which is why the problem often appears only after a restart or a reconnect.
Fixing NOAUTH
NOAUTH is almost always on the client side: it never sent credentials, or sent them on a different connection.
- The client config has no password. Someone enabled auth on the server and not every service got the secret. Find which ones are still trying with
CLIENT LISTon the server or the error logs of each service. - The password is in the wrong place. For a URL, the format is
redis://user:password@host:port/db; special characters must be percent-encoded, as in the documentation'sp%40ssw0rdexample (redis-cli). For authentication without a username, the documented username isdefault. - Reconnects without credentials. In our experience, hand-written connection code that sends
AUTHonce after connecting, but not after an automatic reconnect, produces NOAUTH bursts after every network blip or failover. Configure credentials in the client library, not as a command you send yourself. - Scripts and cron jobs.
redis-cliwithout-a,--userorREDISCLI_AUTHconnects as nobody and gets NOAUTH on the first command.
Fixing WRONGPASS
The full message is WRONGPASS invalid username-password pair or user is disabled. (acl.c). It covers several different problems:
- Wrong password, or wrong user.
AUTH <password>with one argument always authenticates asdefault(AUTH). If your application user isapp, a client that sends only the password checks it against the default user and fails. - User is
off. A new user created withACL SETUSER nameand nothing else is off, has no passwords and no permissions. Addonand a password. - requirepass is ignored.
redis.confwarns thatrequirepassis not compatible withaclfileandACL LOAD; these causerequirepassto be ignored (redis.conf). Then the password of the default user is whatever the ACL file says, not what you put inrequirepass. - Runtime change lost on restart.
ACL SETUSERchanges memory only. With an ACL file you persist withACL SAVE; with users inredis.confyou useCONFIG REWRITE, andCONFIG REWRITEdoes not triggerACL SAVE(external ACL file). A password set by hand last month disappears at the next restart.
Find out who is failing
# safer than -a: the password does not end up in shell history or ps output
export REDISCLI_AUTH='...'
redis-cli -h cache1 --user admin PING
# or type it in
redis-cli -h cache1 --user admin --askpass
ACL LIST # users, on/off, nopass, and password hashes
ACL WHOAMI # who this connection is authenticated as
ACL LOG 10 # recent failed AUTH attempts and denied commands
CONFIG GET aclfile # if set, requirepass is ignored
ACL LOG is the most useful command here. It lists recent failed authentications with AUTH or HELLO (reason auth) and commands denied by ACL rules, with the username, a count of events within a 60-second window and full client-info, including the client address (ACL LOG). That address tells you which host or pod still has the old secret.
For redis-cli, the documentation recommends passing the password through the REDISCLI_AUTH environment variable rather than -a; --askpass prompts for it with a mask, and --user sends the two-argument ACL form of AUTH (redis-cli).
Do not "fix" NOAUTH by removing the password. Redis is designed for trusted networks, and the documentation is explicit that a single FLUSHALL from an outside client can delete the whole dataset (Redis security). Since version 3.2 protected mode limits an instance with the default configuration and no password to loopback clients; switching it off together with the password exposes the instance.
Set it up properly once
# one user per application, no access to dangerous commands
ACL SETUSER app on >PASSWORD_FROM_ACL_GENPASS ~app:* &app:* +@all -@dangerous
# persist it: ACL SAVE with an aclfile, CONFIG REWRITE with users in redis.conf
ACL SAVE
Give each application its own ACL user with only the keys and commands it needs. Every user can have any number of passwords, Redis stores them as SHA-256 hashes, and ACL GENPASS generates a 256-bit random password (ACL guide). The documentation asks for long random passwords because Redis can test a lot of them in parallel in a very short time (AUTH). Note that AUTH itself travels unencrypted unless you use TLS.
Replicas, Sentinel and Cluster
Turning on authentication on the primary also breaks replication if replicas do not know the credentials: the master refuses the replica's sync request. Replicas authenticate with masterauth, and with ACLs also masteruser, which makes them send AUTH <username> <password> (redis.conf). Valkey calls them primaryauth and primaryuser and accepts the old names as aliases (Valkey config.c). The replication user needs only PSYNC, REPLCONF and PING on the master (ACL rules for replicas).
# redis.conf on EVERY node, masters and replicas alike
# (Valkey: primaryuser / primaryauth, the old names still work)
masteruser replica-user
masterauth <replica-user password>
# sentinel.conf
sentinel auth-user mymaster sentinel-user
sentinel auth-pass mymaster <sentinel-user password>
With Sentinel, roles change on failover, so the documentation says to set requirepass and masterauth on all instances, masters and replicas, and Sentinel itself needs sentinel auth-user and sentinel auth-pass (Sentinel). A replica without requirepass that gets promoted becomes an open primary; one without masterauth cannot follow the new primary. In our experience the same applies to Redis Cluster: every node needs the same users and replication credentials. More on Sentinel setups in Redis Sentinel high availability.
What changes with many clients and nodes
On one laptop instance, changing a password is a single command. On a production fleet with dozens of services, hundreds of connections and several nodes:
- Rotation without downtime. Because an ACL user can hold several passwords at once, rotate in three steps: add the new one, roll clients over, remove the old one with
<password.
# 1. add the new password, the old one keeps working
ACL SETUSER app >NEW_SECRET
# 2. roll out NEW_SECRET to every client, wait until ACL LOG is quiet
# 3. remove the old password
ACL SETUSER app <OLD_SECRET
ACL SAVE
- Every node, every time. ACL changes made with
ACL SETUSERapply to the node you run them on. Apply them to all primaries, replicas and Sentinel-monitored instances, and persist them on each, or the next failover brings back the old state. - Reconnect storms. When credentials break for a large fleet, in our experience every client starts reconnecting in a loop. That can push the server into connection limits and hide the real error; see max number of clients reached. Use backoff in client reconnects.
- Users with too much access. One shared
defaultpassword across all services means one leaked secret opens everything, includingFLUSHALL. With per-service users and-@dangerous, a leak is contained. Key patterns do not restrict commands that act on the whole database, such asFLUSHALL,FLUSHDBandSWAPDB, so remove those explicitly. - Monitoring. Watch
ACL LOGor the error rates of clients. A sudden wave ofauthentries means either a broken deploy or someone guessing passwords.
Key takeaways
- NOAUTH: the connection never authenticated. WRONGPASS: it tried with a wrong pair or a disabled user.
- One-argument
AUTHalways means thedefaultuser. - With
aclfileorACL LOAD,requirepassis ignored. - Persist ACL changes with
ACL SAVEorCONFIG REWRITE, on every node. ACL LOGshows which client and user fail.- Set
masteruser/masterauthand passwords on all nodes, and rotate secrets with two passwords per user.