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

**Code:** `Redis fails to start: Address already in use / Bad directive in config` · **Category:** Redis · **Seen on:** Redis, Linux

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/redis/redis-server-wont-start-address-in-use-or-config)
