Redis-rspamd failed to start after restore

NethServer release 7.7.1908 (final)
there are no packages to update

Ciao! today I migrated a nethserver from an old server to a newer one.
Everything went well, but when I accessed the rspamd interface I realized that something was not working.

[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 Thu 2020-02-20 21:45:08 CET; 4min 14s ago
Process: 2548 ExecStop=/usr/libexec/redis-shutdown redis-rspamd (code=exited, status=1/FAILURE)
Process: 2545 ExecStart=/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no (code=exited, status=1/FAILURE)
Main PID: 2545 (code=exited, status=1/FAILURE)

Feb 20 21:45:08 srvmail.livenzaviaggipn.it systemd[1]: Started Redis persistent key-value database Rspamd.
Feb 20 21:45:08 srvmail.livenzaviaggipn.it systemd[1]: redis-rspamd.service: main process exited, code=exited, s…LURE
Feb 20 21:45:08 srvmail.livenzaviaggipn.it redis-shutdown[2548]: Could not connect to Redis at 127.0.0.1:0: Conne…sed
Feb 20 21:45:08 srvmail.livenzaviaggipn.it systemd[1]: redis-rspamd.service: control process exited, code=exited…us=1
Feb 20 21:45:08 srvmail.livenzaviaggipn.it systemd[1]: Unit redis-rspamd.service entered failed state.
Feb 20 21:45:08 srvmail.livenzaviaggipn.it systemd[1]: redis-rspamd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

[root@srvmail ~]# systemctl status redis
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
└─limit.conf
Active: failed (Result: exit-code) since Thu 2020-02-20 20:11:31 CET; 1h 38min ago
Main PID: 1725 (code=exited, status=1/FAILURE)

Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: Starting Redis persistent key-value database…
Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: redis.service: main process exited, code=exited, status=1…LURE
Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: redis.service: control process exited, code=exited status=1
Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: Failed to start Redis persistent key-value database.
Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: Unit redis.service entered failed state.
Feb 20 20:11:31 srvmail.livenzaviaggipn.it systemd[1]: redis.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

the problem persists even after the reboot.

ideas?

Were the old server and the new one at the same level of updates?
Did you updated your “new” server (without installing packages) before applying restore?

My experience into something similar but… without rSpamd


https://community.nethserver.org/t/on-restores-and-migrations/

you both had the same version of nethserver with updates.
when i prepared the new machine i didn’t pre-install the services, i only did software updates.
When I loaded the configuration file in the new server, I enabled the automatic download of the packages/services in use.

Rspamd is running ?

Hi

Sometimes a restore can “overdo” things, like a recent experience with Home Assistant (my personal Home Automation system) showed me.

I migrated the whole installation using the built in backup function from a Raspberry 3B+ to the newer 4 series with 4 GB RAM. Everything worked very well, except for some very irritating logfile entries about corrupt database entries…

Seems that the restore actually restored the SQLlite Database as is, that didn’t correspond with the rest of the machine status. Manually erasing that file, and letting the system recreate that file was the solution, but first find that!
The restore shouldn’t have restored that specific DB file, if it creates problems, but should just create a new empty DB and use a dump restore specific for SQLlite…

Maybe something similiar is going on here…

My 2 cents
Andy

yes!
there’s something weird about before, when since :9090 I access rspamd it asks me for the password…


Afterwards if I access “history” nothing is displayed.

I tried to reinstall redis-rspamd, but nothing changes.

Redis service is not starting. Any clue from:

journalctl -ex -u redis

Redis is not used with rspamd we use redis-rspamd, our custom service.

Do you have the redis-rspamd db at

/var/lib/redis/rspamd/redis-rspamd

The path is from memory, I am on my phone, please search it.

History is stored in redis, so it is normal that it doesnt work, however we have a lot of other modules which use redis as a db storage

1 Like
thanks for the answer, that's what came up after.

Starting Redis persistent key-value database...
-- Subject: Unit redis.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit redis.service has begun starting up.
Feb 21 19:23:45 srvmail.xxxx.it systemd[1]: redis.service: main process exited, code=exited, status=1/FAILURE
Feb 21 19:23:45 srvmail.xxxx.it redis-shutdown[1728]: Could not connect to Redis at 127.0.0.1:6379: Connection refused
Feb 21 19:23:45 srvmail.xxxx.it systemd[1]: redis.service: control process exited, code=exited status=1
Feb 21 19:23:45 srvmail.xxx.it systemd[1]: Failed to start Redis persistent key-value database.
-- Subject: Unit redis.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit redis.service has failed.
-- 
-- The result is failed.
Feb 21 19:23:45 srvmail.xxxx.it systemd[1]: Unit redis.service entered failed state.
Feb 21 19:23:45 srvmail.xxxx.it systemd[1]: redis.service failed.

how can I do that?

ll /var/lib/redis/rspamd/dump.rdb

do you have something ?

[root@srvmail ~]# ls -al /var/lib/redis/rspamd/
total 4
drwxr-xr-x 2 redis redis  22 Feb 11 10:51 .
drwxr-x--- 3 olefy olefy  20 Feb  3 20:25 ..
-rw-r--r-- 1 olefy mail  386 Feb 20 12:42 dump.rdb
[root@prometheus ~]# ll /var/lib/redis/rspamd/dump.rdb
-rw-r--r-- 1 redis mail 5211483 Feb 23 11:59 /var/lib/redis/rspamd/dump.rdb

redis is the owner of my db … does it is the issue ?

maybe it’s a question of permissions?

1 Like
[root@prometheus ~]# ll /var/lib/redis/
total 6160
-rw-r--r-- 1 redis redis 6304186 Dec 22 07:42 dump.rdb
drwxr-xr-x 2 redis redis      46 Feb 23 12:04 rspamd

probably yes

I don’t have this file /var/lib/redis/dump.rdb

not used by us…my server is an early beta tester :smiley:

thanks anyway for your help. I really appreciate your help.
I haven’t solved the problem though. even if you change the permissions to dump.rdb by going to “history” nothing is displayed, and it keeps asking me for the password to access rspamd. Which he never did.

does redis-rspamd is running now ?

after the permission change, did you restart the service ?

you could try to drop the db /var/lib/redis/rspamd/dump.rdb if you don’t care of bayes, answer, history, …

1 Like