Rspamd something strange after migration

NethServer Version: 7.8.2003
Module: RspamD

hi guys, I have a really weird problem with RspamD.
seems not to start correctly.

systemctl status rspamd
● rspamd.service - rapid spam filtering system
   Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/rspamd.service.d
           └─nethserver.conf
   Active: active (running) since Fri 2020-09-04 04:50:28 CEST; 3 days ago
     Docs: https://rspamd.com/doc/
 Main PID: 11561 (rspamd)
   CGroup: /system.slice/rspamd.service
           ├─11561 rspamd: main process; 0.1 msg/sec, 0.0 msg/sec spam, 0.1 msg/sec ham
           ├─11565 rspamd: fuzzy process (localhost:11335)
           ├─11566 rspamd: rspamd_proxy process (/var/run/rspamd/worker-proxy mode=0770 owner=_rspamd group=mail)
           ├─11567 rspamd: controller process (127.0.0.1:11334)
           └─11568 rspamd: hs_helper process

Sep 07 18:06:29 srvup.XXX.it rspamd[11566]: <f0b605>; proxy; rspamd_lua_redis_prepare_connection: cannot connect to redis (...ectory
Sep 07 18:06:29 srvup.XXX.it rspamd[11566]: <f0b605>; lua; lua_redis.lua:950: cannot make redis request to: /var/run/redis-...rspamd
Sep 07 18:06:29 srvup.XXX.it rspamd[11566]: <f0b605>; proxy; rspamd_task_write_log: id: <8b55e698-2e8e-a528-3617-1fd871d162...M(0.00
Sep 07 18:06:29 srvup.XXX.it rspamd[11566]: <f0b605>; proxy; rspamd_protocol_http_reply: regexp statistics: 0 pcre regexps ... total
Sep 07 18:06:29 srvup.XXX.it rspamd[11566]: <2fd904>; proxy; proxy_milter_finish_handler: finished milter connection
Sep 07 18:06:39 srvup.XXX.it rspamd[11565]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis /var/run/redis-...ectory
Sep 07 18:07:39 srvup.XXX.it rspamd[11565]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis /var/run/redis-...ectory
Sep 07 18:08:39 srvup.XXX.it rspamd[11565]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis /var/run/redis-...ectory
Sep 07 18:09:39 srvup.XXX.it rspamd[11565]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis /var/run/redis-...ectory
Sep 07 18:10:39 srvup.XXX.it rspamd[11565]: <>; ; rspamd_redis_pool_new_connection: cannot connect to redis /var/run/redis-...ectory
Hint: Some lines were ellipsized, use -l to show in full.

more

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 Fri 2020-09-04 04:50:28 CEST; 3 days ago
 Main PID: 11560 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

more

redis-cli -s /var/run/redis-rspamd/rspamd monitor
Could not connect to Redis at /var/run/redis-rspamd/rspamd: No such file or directory

what went wrong?
I realized only after I migrated from the same version of nethserver.

this appears via web

how did you migrated your server ?

what is the output of

systemctl start redis-rspamd

could you check in /var/log/maillog if you could find more clues

I had to change a disk, I made configuration backup, data backup and then restore configuration and data restore

[root@srvmail ~]# systemctl start 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 Mon 2020-09-07 21:09:46 CEST; 5s ago
  Process: 24039 ExecStart=/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no (code=exited, status=1/FAILURE)
 Main PID: 24039 (code=exited, status=1/FAILURE)

Sep 07 21:09:44 srvmail.xxx.it systemd[1]: Started Redis persistent key-value database Rspamd.
Sep 07 21:09:46 srvmail.xxx.it systemd[1]: redis-rspamd.service: main process exited, code=exited, status=1/FAILURE
Sep 07 21:09:46 srvmail.xxx.it systemd[1]: Unit redis-rspamd.service entered failed state.
Sep 07 21:09:46 srvmail.xxx.it systemd[1]: redis-rspamd.service failed.

ll /var/lib/redis/ -R

[root@srvmail ~]# ll /var/lib/redis/rspamd/
total 0

ll /var/lib/redis/ -R

ll /var/lib/redis/ -R
/var/lib/redis/:
total 0
drwxr-xr-x 2 redis redis 6 Sep  3 10:59 rspamd

/var/lib/redis/rspamd:
total 0

something interesting in /var/log/redis/rspamd.log

27389:C 07 Sep 21:16:25.029 # Can't chdir to '/var/lib/redis/rspamd': Permission denied

:smiley:

less /var/log/redis/rspamd.log

same above

you miss some important things, did you try to reinstall all the mail stack

yum reinstall nethserver-mail-\*

Even doing the reinstallation nothing has changed.

24039:C 07 Sep 21:09:46.582 # Can't chdir to '/var/lib/redis/rspamd': Permission denied
27389:C 07 Sep 21:16:25.029 # Can't chdir to '/var/lib/redis/rspamd': Permission denied
31270:C 07 Sep 21:22:35.179 # Can't chdir to '/var/lib/redis/rspamd': Permission denied
1022:C 07 Sep 21:23:09.058 # Can't chdir to '/var/lib/redis/rspamd': Permission denied
/var/log/redis/rspamd.log (END)

[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 Mon 2020-09-07 21:23:09 CEST; 1min 9s ago
 Main PID: 1022 (code=exited, status=1/FAILURE)

when i go into rspamd he asks me for the password. i think it’s strange…

the service is down it doesn’t surprise me much

in the cockpit the antispam service is enabled

no solution?

yet no :-?

My cristal ball is broken, did you try to reboot your server and trigger

signal-event nethserver-mail-filter-save

give us also the full message to the start of rspamd and redis-rspamd, maybe something has changed

nothing new

[root@srvmail ~]# uptime
 22:22:23 up 2 min,  1 user,  load average: 5.79, 2.44, 0.91
[root@srvmail ~]# signal-event nethserver-mail-filter-save
[root@srvmail ~]# 

and

[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 Tue 2020-09-08 22:20:37 CEST; 4min 35s ago
 Main PID: 807 (code=exited, status=1/FAILURE)

Sep 08 22:20:37 srvmail.XXX.it systemd[1]: Started Redis persistent key-value database Rspamd.
Sep 08 22:20:37 srvmail.XXX.it systemd[1]: redis-rspamd.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:20:37 srvmail.XXX.it systemd[1]: Unit redis-rspamd.service entered failed state.
Sep 08 22:20:37 srvmail.XXX.it systemd[1]: redis-rspamd.service failed.

and

[root@srvmail ~]# redis-cli -s /var/run/redis-rspamd/rspamd monitor
Could not connect to Redis at /var/run/redis-rspamd/rspamd: No such file or directory