Redis: Could not connect to Redis at 10.0.0.5:6379: Connection timed out
Redis only listens on localhost by default, so remote clients time out or are refused.
Could not connect to Redis at 10.0.0.5:6379: Connection timed outredis.exceptions.TimeoutError: Timeout connecting to serverRedis connection timed out remote host bind 127.0.0.1ETIMEDOUT 10.0.0.5:6379 redisCould not connect to Redis at 10.0.0.5:6379: No route to host Meaning
Set bind 127.0.0.1 10.0.0.5 (private IP) in redis.conf, restart, require a password, and open 6379 only to app servers via firewall/security groups. Never expose Redis publicly: unauthenticated Redis instances get compromised within minutes.
Common causes
bind 127.0.0.1(default)- Firewall/security group blocks 6379
- Cloud private IP not in
bind - Docker published port bound to localhost only
- NAT/port mapping missing
⚡ Quick fix
- Edit
/etc/redis/redis.conf:bind 127.0.0.1 10.0.0.5andrequirepass ...then restart - Allow 6379 only from app servers
- Test:
nc -vz 10.0.0.5 6379
Detailed fix by platform
Linux
sudo ss -ltnp | grep redis; sudo ufw status | grep 6379
How to diagnose
- Bind — Interfaces?
- Firewall — Port restricted?
- Auth — Password set?
🔧 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
- default backend - 404 Ingress returns "404 Not Found" / "default backend - 404" (ingress-nginx)
- DENIED Redis is running in protected mode Redis: DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user
- DNS in pod DNS not working inside a Kubernetes pod (could not resolve host / nslookup: can't resolve)
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