Redis Connection Refused: 3 Usual Suspects

Symptom

Could not connect to Redis at 127.0.0.1:6379.

Root cause

redis-server is not running, bound to a different interface, or protected-mode is on.

Fix, in order

1. Is it running at all?redis-cli ping # PONG or error
2. Check the bind directivegrep ^bind /etc/redis/redis.conf
3. For remote access set a password, then disable protected-moderequirepass <strong-password>

Prevent it coming back

Never expose Redis without auth; monitor its uptime like any dependency.

Run it on clean infra

Spinning up a fresh box to reproduce or escape this error?

DevOps tools shelf

Related

Cloud & DevOps tool comparisons · Hardware build guides

NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.

Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog