Error: connect ECONNREFUSED 127.0.0.1:6379 Redis Origin: Data Last updated 5 Nov 2026

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.

Exact message you may see 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
Seen on: Redis Node.js Linux

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-mode limiting access
  • Redis on a different port (e.g. 6380 TLS)

⚡ Quick fix

  1. sudo systemctl status redis-server and start it
  2. Test: redis-cli -h HOST -p 6379 ping
  3. Use the compose service name (redis)

Detailed fix by platform

Linux

  1. ss -ltnp | grep 6379 && redis-cli ping

How to diagnose

  1. Server — Running?
  2. Host/port — Correct?
  3. 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:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

ActiveRecord::ConnectionNotEstablished — Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found (Ruby / Rails)ActiveRecord::Connect…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 (Redis)BullMQ: Missing lock …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 (Redis)Can't connect to Redi…Celery with Redis: tasks run twice (visibility_timeout) — Celery: Task executed twice / Restoring unacked messages — Redis broker visibility_timeout shorter than task ETA (Redis)Celery with Redis: ta…ClientClosedError: The client is closed (node-redis v4) — node-redis: ClientClosedError: The client is closed (Redis)ClientClosedError: Th…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 (Redis)DENIED Redis is runni…ECONNRESET / Connection reset by peer on idle Redis connection — Redis: Error: read ECONNRESET / redis.exceptions.ConnectionError: Connection reset by peer after idle time (Redis)ECONNRESET / Connecti…ERR unknown command — Redis: (error) ERR unknown command 'JSON.GET', with args beginning with: / unknown command 'FT.SEARCH' (Redis)ERR unknown commandError: co…

Explore the map of this error Full error map →

🧠 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.