// Redis error reference

NOAUTH: Authentication required

The server requires a password and the connection has not authenticated yet, so every command except AUTH, HELLO and QUIT is refused.

Error prefix
NOAUTH
Catégorie
Connection and auth
Message d'erreur
NOAUTH Authentication required.

Ce que cela signifie

NOAUTH means the connection reached Redis but never proved who it is. The server has requirepass set or an ACL setup that demands a login, and until the client sends a successful AUTH (or connects with credentials in the URL), every command except AUTH and QUIT is refused with this exact prefix. HELLO is refused too unless it carries the AUTH option, as in HELLO 3 AUTH default s3cret.

It is almost always a client-side configuration gap: the application has no password configured, the credentials went to one pool but a second app or job runner opened its own unauthenticated connection, or a monitoring tool connects directly. The error appears on the first data command rather than at connect time, because RESP does not require authentication up front.

Causes courantes

  • The server has requirepass or ACL authentication enabled and the client connected without sending AUTH.
  • The credentials are missing from one specific client, such as a job runner or dashboard, while the main application authenticates fine.
  • A proxy or connection pooler forwards commands from a client that never authenticates.

Find the cause

# Does this connection need auth? Run it without credentials:
redis-cli -h db.example.com PING
# (error) NOAUTH Authentication required.
# What the server requires:
redis-cli -a s3cret CONFIG GET requirepass
redis-cli -a s3cret ACL LIST

Comment le corriger

  1. Authenticate the connection right after opening it, or put the credentials in the connection string:

    redis-cli -h db.example.com -a s3cret PING
    # or, inside an existing session:
    AUTH s3cret
  2. Check what the server actually requires before guessing at passwords. On the server host:

    redis-cli -a s3cret CONFIG GET requirepass
    redis-cli -a s3cret ACL LIST
  3. Prefer a named ACL user over the legacy global password when you control the server, so each application can be rotated on its own:

    ACL SETUSER app on >s3cret ~app:* +@read +@write
    AUTH app s3cret

Other ways to handle it

Putting the credentials in a redis:// URL keeps the username and password out of a separate AUTH line: redis://default:[email protected]:6379. Typed inline, the URL still lands in shell history just as -a does, so keep it in a config or environment file where that matters. For fleets, named ACL users beat the single requirepass because each application can be re-passworded without touching the others.

Reproduisez-le en toute sécurité

redis-server --port 7300 --requirepass s3cret --save '' &
redis-cli -p 7300 PING
# (error) NOAUTH Authentication required.
redis-cli -p 7300 -a s3cret PING
# PONG

Questions

NOAUTH or WRONGPASS: which one means the password was wrong?

NOAUTH means no credentials were sent at all. WRONGPASS means a password or username was sent and the server rejected it.

Why does my client report NOAUTH only on the first query?

RESP lets a client open a connection and start sending immediately. Redis defers the rejection to the first command that needs auth, so pools that authenticate lazily surface the error on the first real command.

Can I just turn auth off?

You can clear it with CONFIG SET requirepass "", but the safer fix is keeping auth on and adding the credentials to the client that is missing them.

Erreurs liées

Le code et le texte du message sont issus de Redis documentation and source code. Parcourir la liste complète Redis error list ou Rechercher toutes les erreurs de base de données.

// moins d'erreurs, corrections plus rapides

Work on Redis in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Redis and the other databases you use.

Texte et données de cette page : CC BY 4.0, en citant SQLly (sqlly.app). Code et extraits SQL : MIT. Détails de la licence Le texte des messages d’erreur cité appartient à l’éditeur de la base de données.