Minor(?) problem with rspamd

Discussion in 'Installation/Configuration' started by teves, Sep 18, 2019.

  1. teves

    teves Member

    Hello,

    I have migrated our ISPConfig webserver from spamassassin to rspamd by this howto: https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/

    Apart from minor issues it seems to work well, but I keep getting an error message in the errors list on the history tab of rspamd GUI:
    Can anyone please tell me what that means, and if I need to fix that (and, if so, how)?

    Thank you!
    Regards, Tom


    System is:
    - Debian GNU/Linux 9.9 (stretch)
    - ISPConfig 3.1.15
    - Dovecot 2.2.27
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you either missed installing redis as described in the guide or redis has not been started.
     
  3. teves

    teves Member

    Would be a nice ans simple solution at least, but alas is not the case. ;-)
    I re-checked the howto steps; everything ok, redis and rspamd services running.

    Any other ideas?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you had setup redis before on that server and locked it down in a way that Rspamd can't access it anymore? Or you changed the Redis port?
     
  5. teves

    teves Member

    Hi,

    no I don't think so. Redis port is standard 6379.

    Menawhile I have tried a few things. This did not solve the problem, but maybe the following steps should be done as part od the installation of rspamd:

    I found that in the redis log there are some hints when you restart the redis-server service:
    I fixed the issues by following the suggestions in the log text above. For the first issue (TCP backlog) I used
    1. Code:
      echo 1024 > /proc/sys/net/core/somaxconn
    2. added
      Code:
      net.core.somaxconn=65535
      in the /etc/sysctl.conf file
    After that I restarted redis-server and all issues of the log were gone.

    But this did not change the behaviour of rspamd, I still get the same errors.

    After that I set the redis logging level to debug and searched the output for hints at the times when errors were reported in rspamd. Nothing.

    I will try now to debug the lua module in rspamd that produced the error. If I should find a solution I will post it here.

    Thanks for your help!
    Regards, Tom
     
    till likes this.
  6. elmacus

    elmacus Active Member HowtoForge Supporter

    Hi, sometimes i see this error too on Debian 9, it looks like redis is working and rspamd, have not had time to investigate this yet.
    Not yet seen on Debian 10, so could be that.
     
  7. teves

    teves Member

    Hello,

    after reviewing the problem in all detail again, I have found at least a partial solution now.
    The problem is the Redis connection configuration in rspamd provided by the howto (https://www.howtoforge.com/replacing-amavisd-with-rspamd-in-ispconfig/#install-and-configure-rspamd)

    In the howto the configuration is done by the line
    But this seems to fall short; you have to add the port for the connection to work fully.

    So, in my case, the command should be
    6379 is the default redis port; if you are not sure on which port redis is listening on your server, simply execute
    You should get an output like the following:
    There you will see the correct redis port for your system.

    This fix reduced the amount of rspamd errors on our server significantly.
     
    Taleman and Jesse Norell like this.
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I had also the same redis_cache_cb received error: -messages in rspamd.log. I had been running rspamd for 6 days on this production host, and just yesterday noticed those errors. The fix was like @teves wrote, add the port number to redis.conf.
    I had tested rspamd on my test system before I dared to install on production. But the test system runs Debian 10 Buster, the production system is Debian 9 Strech. On Buster rspamd and redis work despite not having the port number. I do not know about Ubuntu, but Debian 9 seems to need that port number.
    I noticed the error message by chance, I happened to scroll the rspamd GUI history page to the very bottom, where the errors were hiding. Then looking at the logs I saw there were no rspamd_proxy lines, like on the test system. Lesson learned: even if the tool has very nice GUI, always read the logs.
    Readers of this forum may have noticed I tend to promote using Internet Search Engines. I did not ask about this redis_cache_cb error because I first used those search engines and found this thread where the problem was already finely solved.
     
    elmacus likes this.

Share This Page