Rspamd install - Cannot connect to Redis

Vibe

Verified User
Joined
Aug 3, 2005
Messages
124
Hello,

I am hoping that someone may be able to share some suggestions. Today I went through the installation of Rspamd following the Directadmin Docs. Since this server does not have Spamassassin installed, I installed what I believe to be the system requirements using the following:

cd /usr/local/directadmin/custombuild
./build update
./build set eximconf yes
./build set eximconf_release 4.5
./build set blockcracking yes
./build set easy_spam_fighter yes
./build set spamd rspamd
./build set exim yes
./build exim
./build rspamd
./build exim_conf

This is a Centos 7 server and my custombuild options include:

Exim: 4.95
exim.conf update: yes, release 4.5
BlockCracking: yes
Easy Spam Fighter: yes
Rspamd: 1.8.1

During the build process I found Redis was installed as confirmed by another post in the forum. After the installation /var/log/rspamd/rspamd.log displays the following repeated entries. Similar errors also appear when navigating to > Mail Queue Administration > Rspamd Controller > History (among other errors).

#23968(controller) redis_async_new: cannot connect to redis /var/lib/rspamd/.redis/redis.sock (port 0): No such file or directory
#23968(controller) rspamd_lua_redis_prepare_connection: cannot connect to redis (OS error): No such file or directory
#23968(controller) lua; lua_redis.lua:1222: cannot execute redis request to load script on /var/lib/rspamd/.redis/redis.sock

*I saved a users' SpamAssassin settings for testing through DirectAdmin - the config files do appear at /etc/rspamd/users.d/username.conf.

My dilemma:

Are the error messages typical for DirectAdmin without the "Pro Pack" - or have I missed something during the installation?

Does Redis need to be manually started/enabled with systemctl start redis.service + systemctl enable redis? (Not mentioned in the DA Docs).

I found a similar issue in the forum - no reply was provided for this user.

Any assistance is greatly appreciated - thanks!
 
Last edited:
Just a quick follow-up.

After initially installing Rspamd according to the DirectAdmin Docs and seeing the error messages from my first post - I restarted Rspamd through DA's Service Monitor several times. The error messages continued and memory usage was roughly 750MB within DA's Service Monitor.

Today I manually restarted redis-rspamd with:

# systemctl restart redis-rspamd

It appears Rspamd is now able to connect to Redis (i.e., /var/lib/rspamd/.redis/redis.sock exists). The original errors have also disappeared from the rspamd.log. I am also no longer seeing errors when I access the Rspamd Controller.

I have not been able to find much information regarding resource usage, and after reading this post I was a bit concerned. Memory usage for Rspamd has also reduced to approximately 75MB - great to see.

However, with regard to the features only available in DA's "Pro Pack" - I am not certain if the following errors are expected:

# ll /var/run/redis-rspamd/rspamd

Running the above returns:

ls: cannot access /var/run/redis-rspamd/rspamd: No such file or directory

# systemctl status redis

Running the above returns:

Unit redis.service could not be found.

Is this expected with the installation of Rspamd on DirectAdmin (i.e. without the "Pro Pack")?
 
Hi,

Have you ever had a solution for this? I want to use redis on my server (multiple sites) with rspamd using only 1 instance of redis.
 
Back
Top