redis connection_error ai_generated true

Error: Could not connect to Redis at 127.0.0.1:6379: Connection refused

ID: redis/connection-refused

Also available as: JSON · Markdown
92%Fix Rate
92%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7 active

Root Cause

Redis server not running or not listening on expected port.

generic

Workarounds

  1. 95% success Start the Redis service
    sudo systemctl start redis && sudo systemctl enable redis

    Sources: https://redis.io/docs/

  2. 90% success Check if Redis is running and on which port
    redis-cli ping  # should return PONG; ss -tlnp | grep redis
  3. 85% success Check redis.conf bind and protected-mode settings
    bind 127.0.0.1; protected-mode yes  # default; change for remote access

Dead Ends

Common approaches that don't work:

  1. Reinstall Redis 80% fail

    Connection refused means the service is not running, not a broken installation

  2. Change the port in redis.conf to avoid conflict 65% fail

    Other applications expect the default port. Fix the port conflict instead.