On Wed, 12 Jul 2023, Wingfully Team via users wrote:
Hi,
I’m using SpamAssassin 3.4.0 on a VPS hosted by Hostinger with CentOS 7.
CyberPanel was installed by Hostinger.
I am constantly (every 90 seconds) seeing spamassassin fail to start, seemingly
because it can’t find the PID file. I’m sending and receiving emails fine (it
seems), but this is not only filling up logs/disk space, I’m also worried
something else is misconfigured which could potentially be causing other
problems. Here are the logs from /var/log/messages:
Jul 12 23:14:02 wingfully systemd: spamassassin.service start operation timed
out. Terminating.
Jul 12 23:14:02 wingfully systemd: Unit spamassassin.service entered failed
state.
Jul 12 23:14:02 wingfully systemd: spamassassin.service failed.
Jul 12 23:14:02 wingfully systemd: spamassassin.service holdoff time over,
scheduling restart.
Jul 12 23:14:04 wingfully systemd: Can't open PID file /run/spamassassin.pid
(yet?) after start: No such file or directory
Jul 12 23:15:32 wingfully systemd: spamassassin.service start operation timed
out. Terminating.
Jul 12 23:15:33 wingfully systemd: Unit spamassassin.service entered failed
state.
Jul 12 23:15:33 wingfully systemd: spamassassin.service failed.
Jul 12 23:15:33 wingfully systemd: spamassassin.service holdoff time over,
scheduling restart.
Jul 12 23:15:34 wingfully systemd: Can't open PID file /run/spamassassin.pid
(yet?) after start: No such file or directory
Here’s the output from systemctl status spamassassin -l
● spamassassin.service - Spamassassin daemon
Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; enabled; vendor
preset: disabled)
Drop-In: /etc/systemd/system/spamassassin.service.d
└─override.conf
Active: activating (start) since Wed 2023-07-12 23:29:07 EDT; 1min 5s ago
Process: 5193 ExecStart=/usr/bin/spamd --pidfile /var/run/spamd.pid
$SPAMDOPTIONS (code=exited, status=0/SUCCESS)
Process: 5191 ExecStartPre=/sbin/portrelease spamd (code=exited,
status=0/SUCCESS)
CGroup: /system.slice/spamassassin.service
├─5198 /usr/bin/spamd --pidfile /var/run/spamd.pid -d -c -m5 -
├─5199 spamd chil
└─5200 spamd chil
Jul 12 23:29:07 wingfully.host systemd[1]: Stopped Spamassassin daemon.
Jul 12 23:29:07 wingfully.host systemd[1]: Starting Spamassassin daemon...
Jul 12 23:29:07 wingfully.host spamd[5193]: logger: removing stderr method
Jul 12 23:29:09 wingfully.host spamd[5198]: spamd: server started on
IO::Socket::IP [127.0.0.1]:783, IO::Socket::IP [::1]:783 (running version 3.4.0)
Jul 12 23:29:09 wingfully.host spamd[5198]: spamd: server pid: 5198
Jul 12 23:29:09 wingfully.host systemd[1]: Can't open PID file
/run/spamassassin.pid (yet?) after start: No such file or directory
Jul 12 23:29:09 wingfully.host spamd[5198]: spamd: server successfully spawned
child process, pid 5199
Jul 12 23:29:09 wingfully.host spamd[5198]: spamd: server successfully spawned
child process, pid 5200
Jul 12 23:29:09 wingfully.host spamd[5198]: prefork: child states: IS
Jul 12 23:29:09 wingfully.host spamd[5198]: prefork: child states: II
I can’t seem to figure this out. Does anyone knows what’s going on?
Thanks,
Matt
spamd & systemd aren't agreeing on where the PID file is.
look at spamd argument list:
/usr/bin/spamd --pidfile /var/run/spamd.pid
Note that "/var/run/" part.
Systemd is barking about not finding: "Can't open PID file
/run/spamassassin.pid"
So either change spamd arguments or systemd spamassassin overrides.conf file so
they agree on where the silly '.pid' file is going to live.
Note; do NOT change the spamassassin.service file (the next system update will
overwrite your changes). Put your customizations in the
/etc/systemd/system/spamassassin.service.d/override.conf file
Then make sure it actually ends up there.
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center, 103 S Capitol St.
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{