Redis fails to start: Address already in use / Bad directive in config Redis Origin: Data OSI layer 7 · Application Last updated 5 Nov 2026

Redis: # Could not create server TCP listening socket *:6379: bind: Address already in use / *** FATAL CONFIG FILE ERROR ***

redis-server exits at startup because the port is taken or the config file has an error.

Exact message you may see Could not create server TCP listening socket *:6379: bind: Address already in use*** FATAL CONFIG FILE ERROR (Redis 7.0.0) ***Bad directive or wrong number of argumentsFailed listening on port 6379 (tcp), aborting.Can't open the append-only file: Permission denied
Seen on: Redis Linux

Meaning

Find the owner of the port (ss -ltnp | grep 6379) — maybe a second Redis instance or a stuck process — or change port. For config errors, the message prints the line and reason (unknown directive, wrong arguments). Run redis-server /etc/redis/redis.conf --test-memory/check logs journalctl -u redis-server.

Common causes

  • Another Redis already on 6379
  • Config typo or unsupported directive for the version
  • Wrong file permissions/ownership
  • Invalid bind address
  • Stale PID/unix socket file

⚡ Quick fix

  1. sudo ss -ltnp | grep 6379 and stop the other process or change port
  2. Fix the config line shown in FATAL CONFIG FILE ERROR
  3. Check journalctl -u redis-server -n 50

Detailed fix by platform

Linux

  1. redis-server /etc/redis/redis.conf in foreground shows the exact error

How to diagnose

  1. Port — Owner?
  2. Config — Line number?
  3. Version — Directive supported?

🔧 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):

bind() failed (98: Address already in use) — nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) (Linux)bind() failed (98: Ad…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…ERR CONFIG SET failed (possibly related to argument) — Redis: (error) ERR CONFIG SET failed (possibly related to argument 'maxmemory') - can't set immutable config (Redis)ERR CONFIG SET failed…ERR DB index is out of range — Redis: (error) ERR DB index is out of range / ERR SELECT is not allowed in cluster mode (Redis)ERR DB index is out o…ERR This instance has cluster support disabled — Redis: (error) ERR This instance has cluster support disabled (Redis)ERR This instance has…Error: connect ECONNREFUSED 127.0.0.1:6379 — Redis: Error: connect ECONNREFUSED 127.0.0.1:6379 / Could not connect to Redis at 127.0.0.1:6379: Connection refused (Redis)Error: connect ECONNR…ExceptionInInitializerError — java.lang.ExceptionInInitializerError (Java)ExceptionInInitialize…Exited (0) — Docker container exits immediately (Exited (0) / Exited (1) right after start) (Docker)Exited (0)Redis fai…

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.