Description of problem: no rotation of logfile and wrong reload of rspamd reason: pid file doesnt exists. in rspamd.service ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f ExecReload=/bin/kill -HUP $MAINPID on reload of rspamd, rspamd produce additional rspamd processes. With $MAINPID you get only the first pid not the pids of the rest (-f) If you reload only the first pid you let the other pids stay and produce additional proccesses. There is no forking. in /etc/logrotate.d/rspamd you look for a pid file that doesnt exists, because of $MAINPID postrotate [ ! -f /var/run/rspamd/rspamd.pid ] || kill -USR1 `cat /var/run/rspamd/rspamd.pid` Version-Release number of selected component (if applicable): rspamd-1.8.3-1.mga7 Steps to Reproduce: always after install and running rspamd
What can we do to fix properly this issue, have you an idea?
CC: (none) => geiger.david68210
Assigning to the registered maintainer!
Assignee: bugsquad => shlomif
at this time i restart rspamd on logrotate but this is not a real solution. postrotate /usr/bin/systemctl retart rspamd > /dev/null 2>/dev/null || true I don't know how this works on other distributions with systemd
Summary: no logrotate and reload wrong => rspamd: incorrect service and logrotate configurations
CC: (none) => shlomifAssignee: shlomif => pkg-bugs
could anyone examine (recheck) if this is the solution ? /lib/systemd/system/rspamd.service: [Unit] Description=rapid spam filtering system After=nss-lookup.target network-online.target redis.service Documentation=https://rspamd.com/doc/ [Service] LimitNOFILE=1048576 NonBlocking=true ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f ExecReload=/bin/kill -USR1 $MAINPID User=_rspamd RuntimeDirectory=rspamd RuntimeDirectoryMode=0755 Restart=always [Install] WantedBy=multi-user.target /etc/logrotate.d/rspamd: /var/log/rspamd/*log { daily rotate 7 missingok notifempty compress sharedscripts postrotate systemctl --signal=USR1 --kill-who=main kill rspamd.service 2>/dev/null || : endscript } It seems it is running on my side but i'm not secure if this is the solution.
Please try with rspamd-1.8.3-1.1.mga7 in Core/Updates_testing repo!
Sorry rspamd-1.8.3-1.1.mga7 is to old. rspamd 1.8.3 is from 03.Dec 2018 now we have 2020 for me, i have rebuild a package with rspamd 2.3 There are important bugfixes and new features in the Versions 2.1 and newer. rspamd is so much better and faster than amavis with spamassassin.
That's not a valid response Dieter. We update things only within the same stable branches usually and otherwise only if we have to, not just because of new features. Does this update fix the reported packaging issues or not?
Assignee: pkg-bugs => qa-bugs
MGA7-64 Plasma on Lenovo B50 No installation issues No previous updates, so just trying to get the service running. At CLI: # systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: inactive (dead) Docs: https://rspamd.com/doc/ # systemctl -l start rspamd # systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-09-01 10:57:18 CEST; 4s ago Docs: https://rspamd.com/doc/ Main PID: 18364 (rspamd) Tasks: 5 (limit: 4915) Memory: 39.4M CGroup: /system.slice/rspamd.service ├─18364 rspamd: main process ├─18367 rspamd: rspamd_proxy process (localhost:11332) ├─18368 rspamd: controller process (localhost:11334) ├─18369 rspamd: normal process (localhost:11333) └─18370 rspamd: normal process (localhost:11333) Sep 01 10:57:18 mach5.hviaene.thuis systemd[1]: Started rapid spam filtering system. # systemctl -l stop rspamd # systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: inactive (dead) since Tue 2020-09-01 10:57:41 CEST; 2s ago Docs: https://rspamd.com/doc/ Process: 18364 ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f (code=exited, status=0/SUCCESS) Main PID: 18364 (code=exited, status=0/SUCCESS) Sep 01 10:57:18 mach5.hviaene.thuis systemd[1]: Started rapid spam filtering system. Sep 01 10:57:40 mach5.hviaene.thuis systemd[1]: Stopping rapid spam filtering system... Sep 01 10:57:41 mach5.hviaene.thuis systemd[1]: rspamd.service: Succeeded. Sep 01 10:57:41 mach5.hviaene.thuis systemd[1]: Stopped rapid spam filtering system. # ps -aux | grep rspamd root 8241 0.0 0.0 9044 816 pts/1 S+ 11:03 0:00 grep --color rspamd So, it seems to behave. When running # systemctl -l start rspamd # ps -aux | grep rspamd _rspamd 13273 8.2 0.5 74124 42832 ? Ss 11:04 0:00 rspamd: main process _rspamd 13275 0.0 0.4 74124 34020 ? S 11:04 0:00 rspamd: rspamd_proxy process (localhost:11332) _rspamd 13276 0.2 0.4 75808 38748 ? S 11:04 0:00 rspamd: controller process (localhost:11334) _rspamd 13277 0.0 0.4 74884 36596 ? S 11:04 0:00 rspamd: normal process (localhost:11333) _rspamd 13278 0.0 0.4 74884 36612 ? S 11:04 0:00 rspamd: normal process (localhost:11333) root 13282 0.0 0.0 9044 808 pts/1 S+ 11:04 0:00 grep --color rspamd Leaving to people with more knowledge to decide whether this is OK.
CC: (none) => herman.viaene
Looking at the packaging changes, it's probably OK. Make sure that "systemctl reload rspamd" works correctly. If it does, then you can OK/validate it.
# systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: inactive (dead) Docs: https://rspamd.com/doc/ # systemctl -l start rspamd # systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-09-02 14:25:48 CEST; 4s ago Docs: https://rspamd.com/doc/ Main PID: 6415 (rspamd) Tasks: 5 (limit: 4915) Memory: 37.4M CGroup: /system.slice/rspamd.service ├─6415 rspamd: main process ├─6988 rspamd: rspamd_proxy process (localhost:11332) ├─6989 rspamd: controller process (localhost:11334) ├─6990 rspamd: normal process (localhost:11333) └─6991 rspamd: normal process (localhost:11333) Sep 02 14:25:48 mach5.hviaene.thuis systemd[1]: Started rapid spam filtering system. # systemctl reload rspamd # systemctl -l status rspamd ● rspamd.service - rapid spam filtering system Loaded: loaded (/usr/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-09-02 14:25:48 CEST; 14s ago Docs: https://rspamd.com/doc/ Process: 7001 ExecReload=/bin/kill -USR1 $MAINPID (code=exited, status=0/SUCCESS) Main PID: 6415 (rspamd) Tasks: 5 (limit: 4915) Memory: 37.5M CGroup: /system.slice/rspamd.service ├─6415 rspamd: main process ├─6988 rspamd: rspamd_proxy process (localhost:11332) ├─6989 rspamd: controller process (localhost:11334) ├─6990 rspamd: normal process (localhost:11333) └─6991 rspamd: normal process (localhost:11333) Sep 02 14:25:48 mach5.hviaene.thuis systemd[1]: Started rapid spam filtering system. Sep 02 14:25:57 mach5.hviaene.thuis systemd[1]: Reloading rapid spam filtering system. Sep 02 14:25:57 mach5.hviaene.thuis systemd[1]: Reloaded rapid spam filtering system. So OK for me.
Whiteboard: (none) => MGA7-64-OK
Advisory: The rspamd package has been changed to fix the service definition and logrotate configuration so that the service is reloaded properly and log rotation works properly. SRPM: rspamd-1.8.3-1.1.mga7.src.rpm
Keywords: (none) => validated_updateCC: (none) => sysadmin-bugs
Keywords: (none) => advisory
An update for this issue has been pushed to the Mageia Updates repository. https://advisories.mageia.org/MGAA-2020-0200.html
Status: NEW => RESOLVEDResolution: (none) => FIXED