Valkeyservice won't start - Upgrade from F40 to F41

Upon upgrading to F41, Redis was removed and replaced with valkey (which I was aware would happen,) but the Valkey service fails to start:

$ systemctl status valkey.service
× valkey.service - Valkey persistent key-value database
     Loaded: loaded (/usr/lib/systemd/system/valkey.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Sat 2024-11-02 21:02:37 GMT; 18min ago
 Invocation: b42ccea76c564ed7bbd8fc038472bbc7
   Main PID: 1812 (code=exited, status=1/FAILURE)
   Mem peak: 6M
        CPU: 12ms

Nov 02 21:02:37 fedora systemd[1]: Starting valkey.service - Valkey persistent key-value database...
Nov 02 21:02:37 fedora valkey-server[1812]: *** FATAL CONFIG FILE ERROR (Version 8.0.1) ***
Nov 02 21:02:37 fedora valkey-server[1812]: Can't open the log file: Permission denied
Nov 02 21:02:37 fedora systemd[1]: valkey.service: Main process exited, code=exited, status=1/FAILURE
Nov 02 21:02:37 fedora systemd[1]: valkey.service: Failed with result 'exit-code'.
Nov 02 21:02:37 fedora systemd[1]: Failed to start valkey.service - Valkey persistent key-value database.

I have tried removing and reinstalling valkey-compat-redis but the same error occurs, and I can’t roll back to redis as it is no longer a package. Is anyone else having the same issue, or can help me resolve?

1 Like

Try switching SELinux to permissive mode:

sudo setenforce 0
sudo systemctl restart valkey.service

If that works, consider creating a custom permissive module:
8.3.8. Allowing Access: audit2allow | Red Hat Product Documentation

2 Likes

Thank you!

1 Like

I’ve been upgrading some of my F40 systems to F41 and both of the servers which use redis (now valkey) had identical errors despite the fact that selinux was set to ‘disabled’.

It’s a permissions issue, so I was able to work around this issue by adding the ‘valkey’ user to the ‘redis’ group and changing permissions on /var/log/redis to 0750 and the contents of the folder to 0664.

This seems like an upgrade/migration detail which isn’t a corner case at all, rather it will affect every F40 system which runs redis upon upgrade to F41.

N.B.: Your solution is correct and actually works, but doesn’t cover the selinux=disabled case.

2 Likes