<"mail@domain.tld+learn_ham"@spamtrain.nh>: Command died with status 1

NethServer Version: 7.6.
Module: mail2

Hi there, Hey @stephdl

I probably did something wrong : the spam training feature doesn’t work anymore on my server. Each time I move a mail from Inbox to Spam or the other way, I receive a non-delivery notification saying this :

This is the mail system at host mattlabs.gaillet.be.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

              The mail system

<"matthieu@gaillet.be+learn_ham"@spamtrain.nh>: Command died with status 1:
   "/usr/bin/rspamc". Command output: Results for file: stdin (0.769 seconds)
   HTTP error: 110, error getting reply from redis server
   /var/run/redis-rspamd/rspamd: timeout
Reporting-MTA: dns; mattlabs.gaillet.be
X-Postfix-Queue-ID: 6EAC4C12AFF1
X-Postfix-Sender: rfc822; root@mattlabs.gaillet.be
Arrival-Date: Tue, 15 Jan 2019 20:33:39 +0100 (CET)

Final-Recipient: rfc822; "matthieu@gaillet.be+learn_ham"@spamtrain.nh
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; Results for file: stdin (0.769 seconds) HTTP error:
   110, error getting reply from redis server /var/run/redis-rspamd/rspamd:
   timeout

What could cause this redis server to fail ? I checked this :

[root@mattlabs ~]# redis-cli

127.0.0.1:6379&gt; ping

PONG

127.0.0.1:6379&gt; set mykey somevalue

OK

127.0.0.1:6379&gt; get mykey

"somevalue"

127.0.0.1:6379&gt;

Looks it works…

Thanks for helping.

matthieu

check if the linux socket is there

[root@prometheus ~]# ll /var/run/redis-rspamd/rspamd
srwxrwx--- 1 redis mail 0 Sep  6 18:11 /var/run/redis-rspamd/rspamd
[root@prometheus ~]# systemctl status redis redis-rspamd
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: inactive (dead)

● redis-rspamd.service - Redis persistent key-value database Rspamd
   Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-09-06 18:11:37 CEST; 4 months 9 days ago
 Main PID: 22728 (redis-server)
   CGroup: /system.slice/redis-rspamd.service
           └─22728 /usr/bin/redis-server 127.0.0.1:0

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

someone gets redis removed manually, check if it is installed

Txs.

Can’t see anything wrong :

# ll /var/run/redis-rspamd/rspamd
srwxrwx--- 1 redis mail 0 Dec 21 10:20 **/var/run/redis-rspamd/rspamd** 

# systemctl status redis redis-rspamd
● 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: active (running) since Wed 2019-01-16 22:03:55 CET; 1s ago
  Process: 19093 ExecStop=/usr/libexec/redis-shutdown (code=exited, status=0/SUCCESS)
 Main PID: 19145 (redis-server)
   CGroup: /system.slice/redis.service
           └─19145 /usr/bin/redis-server 127.0.0.1:6379

Jan 16 22:03:55 mattlabs.gaillet.be systemd[1]: Starting Redis persistent key-value database...
Jan 16 22:03:55 mattlabs.gaillet.be systemd[1]: Started Redis persistent key-value database.

● redis-rspamd.service - Redis persistent key-value database Rspamd
   Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2019-01-16 22:03:55 CET; 1s ago
  Process: 19094 ExecStop=/usr/libexec/redis-shutdown redis-rspamd (code=exited, status=0/SUCCESS)
 Main PID: 19143 (redis-server)
   CGroup: /system.slice/redis-rspamd.service
           └─19143 /usr/bin/redis-server 127.0.0.1:0

Jan 16 22:03:55 mattlabs.gaillet.be systemd[1]: Started Redis persistent key-value database Rspamd.

normally the redis service is not started by rspamd, why your redis service is up and enbaled to start at boot ?

No idea. I should probably query the yum history. It is true I fiddle a lot with that server :slight_smile: Probably a bit too much :blush:

@mrmarkuz could it be that collabora broke something ? I recently installed your module as you know.

mmmmh…
[root@mattlabs ~]# rpm -q --whatrequires redis
nethserver-redis-1.1.0-1.ns7.noarch
ntopng-3.3.180109-3804.x86_64
nethserver-ntopng-2.1.1-1.ns7.noarch
nethserver-mail-filter-2.4.3-1.ns7.noarch

Would I simply try to reinstall mail2 ?

you could try:

yum reinstall nethserver-mail-\* rspamd\*

IIRC ntop uses redis, it should be normal

1 Like

I don’t think so. The collabora module does not use redis even if it’s used in some Nextcloud/Collabora docker images. It’s not a requirement of Nextcloud or CODE.
I tested now on one of my servers and collabora and spam training are working.

Onlyoffice and diaspora use redis too.

1 Like

It’s working now. Go figure.

Thanks too @mrmarkuz :slight_smile:

2 Likes

Looks like it’s solved here : https://github.com/NethServer/dev/issues/5722