The chown errors happened because the directories don’t exist yet (or were deleted/cleaned up during failed starts).

Let’s fix Redis properly, step by step:

Run these commands one by one and tell me the output of each (especially any errors):

# 1. Create the missing runtime directory
sudo mkdir -p /var/run/redis
sudo chown redis:redis /var/run/redis
sudo chmod 755 /var/run/redis
 
# 2. Fix the main data and log directories (very common cause of startup failure)
sudo mkdir -p /var/lib/redis /var/log/redis
sudo chown -R redis:redis /var/lib/redis /var/log/redis
sudo chmod -R 770 /var/lib/redis /var/log/redis
 
# 3. Reset systemd's "start too quickly" limit
sudo systemctl reset-failed redis-server.service
 
# 4. Try starting Redis again
sudo systemctl start redis-server
 
# 5. Check the current status
sudo systemctl status redis-server

After that, also check the real error logs:

sudo journalctl -u redis-server.service -e --no-pager

Paste the output here (especially the last 20-30 lines).

Extra quick fixes to try if it still fails:

A. Fix the bind address (very common on Ubuntu):

sudo sed -i 's/^bind 127.0.0.1 ::1/bind 127.0.0.1/' /etc/redis/redis.conf
sudo systemctl restart redis-server

B. If you see PID file issues, remove stale PID:

sudo rm -f /var/run/redis/redis.pid /run/redis/redis-server.pid
sudo systemctl start redis-server

C. Test manually (helps see the exact error):

sudo -u redis /usr/bin/redis-server /etc/redis/redis.conf

Let me know what happens after running the 5 main commands above.

Also, confirm:

  • What does redis-cli ping say now? (if it says “Could not connect”, that’s expected until it starts)
  • Did you recently upgrade Ubuntu, Redis, or change any config?

We’ll get it running. Just share the outputs.

↑ Back to Linux