Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

systemd fails to start redis-server.service with status=1

ErrorFailed to start Advanced key-value store.

Short answer

Status 1 only says Redis exited at startup. Read the service log for the reason. The two causes the Redis docs confirm are another process already holding port 6379, and a bind line that lists an address the server cannot open, such as ::1 on a host without IPv6.

  • Applies to Redis 7.4, Redis 8, Ubuntu 24.04, systemd
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the last log lines of the unit. The Redis line just before the exit names the cause.

    sudo systemctl status redis-server --no-pager
    sudo journalctl -u redis-server -n 40 --no-pager
  2. 2Match what you see, then jump to its fix

    1. 1The log mentions an address already in use for port 6379Another Redis already holds port 6379Fix
    2. 2bind line contains ::1 without a leading dash, on a host where IPv6 is disabledThe bind line lists an address this server cannot openFix

What does the error look like?

  • Failed to start Advanced key-value store.
  • redis-server.service: Control process exited, code=exited status=1

Cause 1 of 2

Another Redis already holds port 6379

1Check

A second instance may run from a Snap package, a manual redis-server, or a leftover process. Redis defaults to port 6379.

sudo ss -ltnp | grep 6379

2Fix

Stop the other instance, or give this one a different port in redis.conf. Redis does not start when an address is already in use.

# stop the other one (snap example)
sudo snap stop redis
# or change the port in /etc/redis/redis.conf
# port 6380
sudo systemctl restart redis-server

3Verify

The service is active and answers.

sudo systemctl is-active redis-server
redis-cli ping

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 2

The bind line lists an address this server cannot open

1Check

The sample redis.conf uses bind 127.0.0.1 -::1. A dash before an address means Redis still starts if that address is unavailable. Without the dash, a missing ::1 stops startup.

grep -n '^bind' /etc/redis/redis.conf

2Fix

Add the dash in front of the IPv6 address, or remove it from the bind line.

# /etc/redis/redis.conf
bind 127.0.0.1 -::1

3Verify

Restart the service and confirm it stays up.

sudo systemctl restart redis-server
sudo systemctl is-active redis-server

Confirmed by raw.githubusercontent.com

Did this fix it?

How do I stop it coming back?

  • Run only one Redis per port: choose apt or Snap, not both.
  • Keep bind 127.0.0.1 -::1 as the base line when you edit redis.conf.
  • After every redis.conf edit, restart the unit and read the journal once.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Servers

dnf cannot install MySQL on Amazon Linux 2023

dnf cannot find a mysql-server package on Amazon Linux 2023

Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.