Check if the folder of the redis socket exists
/var/run/redis-rspamd
What is the permission of this folder
Check if the folder of the redis socket exists
/var/run/redis-rspamd
What is the permission of this folder
[root@srvmail ~]# ls -al /var/run/redis-rspamd
ls: cannot access /var/run/redis-rspamd: No such file or directory
Ok this is the important hit, make the the folder with vmail permission iirc
Not at home will check my server later
drwxr-xr-x 2 redis mail 80 Jun 15 15:41 /vr/run/redis-rspamd
/var/run/redis-rspamd/:
srwxrwx--- 1 redis mail 0 Jun 15 15:41 rspamd
-rw-r--r-- 1 redis mail 4 Jun 15 15:41 rspamd.pid
but
[root@prometheus ~]# systemctl cat redis-rspamd
# /usr/lib/systemd/system/redis-rspamd.service
[Unit]
Description=Redis persistent key-value database Rspamd
[Service]
ExecStart=/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no
ExecStop=/usr/libexec/redis-shutdown redis-rspamd
User=redis
Group=mail
RuntimeDirectory=redis-rspamd
RuntimeDirectoryMode=0755
so it is systemd itself that create the runtime directory, the key is to understand why redis-rspamd doesn’t start
what is the output of
/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no
no output happens, it remains suspended, I don’t get a new shell…
[root@srvmail ~]# systemctl restart redis-rspamd
[root@srvmail ~]# systemctl status redis-rspamd
● redis-rspamd.service - Redis persistent key-value database Rspamd
Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since gio 2020-09-10 10:24:48 CEST; 1s ago
Process: 12924 ExecStart=/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no (code=exited, status=233/RUNTIME_DIRECTORY)
Main PID: 12924 (code=exited, status=233/RUNTIME_DIRECTORY)
set 10 10:24:48 srvmail.XXX.it systemd[1]: Started Redis persistent key-value database Rspamd.
set 10 10:24:48 srvmail.XXX.it systemd[12924]: Failed at step RUNTIME_DIRECTORY spawning /usr/bin/redis-server: File exists
set 10 10:24:48 srvmail.XXX.it systemd[1]: redis-rspamd.service: main process exited, code=exited, status=233/RUNTIME_DIRECTORY
set 10 10:24:48 srvmail.XXX.it systemd[1]: Unit redis-rspamd.service entered failed state.
set 10 10:24:48 srvmail.XXX.it systemd[1]: redis-rspamd.service failed.
in /var/run/ never see the folder redis-rspamd
this problem will remain a mystery, and I have another server with the same problem…
@loryaegis this is a perfect timing for… check the marks of the servers.
What are the differences, which are the similarities. Of course… excluding the obvious (hostname, ip addres, etc etc) but maybe the two setups/installatins share something.
Same ISP? Same kind of connections between ISP And Nethserver (forwarding included if behind a nat) or CPE setup…
IIUC you did a migration by a backup, then maybe we could reproduce it, could you confirm ?
Yes,
fantastic! we understood the problem, thank you very much @stephdl .
It is a problem of permissions.
chown redis:redis -R /var/lib/redis
systemctl start redis-rspamd
systemctl status redis-rspamd
ll /var/lib/redis/rspamd/
total 12
-rw-r--r-- 1 redis mail 4626 Sep 17 17:10 dump.rdb
Yes my concern was that the /var/lib/redis
folder was set with an ownership to olefy:olefy
How we can prevent this for the next time
Why this ownership has been set by the restoration
cc @davidep
To summarize, redis-rspamd doesn’t want to start because redis
lost the permission to /var/lib/redis
, the owner and the group was olefy
yes exactly, I had this problem on 2 servers always after the restore.
I confirm that on the other server I solved the group permissions change.
Little bug?