Redis: Error: connect ECONNREFUSED 127.0.0.1:6379 / Could not connect to Redis at 127.0.0.1:6379: Connection refused
Nothing is listening on the Redis host/port your client uses.
Error: connect ECONNREFUSED 127.0.0.1:6379Could not connect to Redis at 127.0.0.1:6379: Connection refusedredis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refusedReplyError: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSEDio.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379 Meaning
Redis isn't running, listens elsewhere (bind, port), or you're in Docker where localhost is the app container. Start it (sudo systemctl start redis-server, brew services start redis), check ss -ltnp | grep 6379, redis-cli ping, and use the service name in compose/Kubernetes.
Common causes
- Redis server not running or crashed
- Wrong host/port in the client config
- Docker/K8s: localhost instead of service name
bind/protected-modelimiting access- Redis on a different port (e.g. 6380 TLS)
⚡ Quick fix
sudo systemctl status redis-serverand start it- Test:
redis-cli -h HOST -p 6379 ping - Use the compose service name (
redis)
Detailed fix by platform
Linux
ss -ltnp | grep 6379 && redis-cli ping
How to diagnose
- Server — Running?
- Host/port — Correct?
- Network — Docker service name?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ActiveRecord::ConnectionNotEstablished Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found
- BullMQ: Missing lock for job / job stalled more than allowable limit BullMQ: Error: Missing lock for job 42. moveToFinished / job stalled more than allowable limit
- Can't connect to Redis from another host (bind 127.0.0.1) Redis: Could not connect to Redis at 10.0.0.5:6379: Connection timed out
Most viewed in Redis
- READONLY You can't write against a read only replica Redis: READONLY You can't write against a read only replica
- MISCONF Redis: MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- OOM command not allowed Redis: OOM command not allowed when used memory > 'maxmemory'
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026