On 31/03/16 00:51, Julian Pilfold-Bagwell wrote:
Hi All,

I have amavisd-new, clamav and spamassassin running alongside postfix
and cyrus and I have a situation where restarting amavisd using
systemctl doesn't exit you to the command prompt, it just waits for ages
before failing and prints the following:

Job for amavisd.service failed because a timeout was exceeded. See
"systemctl status amavisd.service" and "journalctl -xe" for details.

systemctl status amavisd.service provides:

amavisd.service - Amavisd-new is an interface between MTA and content
checkers.
    Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled;
vendor preset: disabled)
Active: activating (start) since Wed 2016-03-30 15:09:11 BST; 42s ago
      Docs: http://www.ijs.si/software/amavisd/#doc
   Process: 12357 ExecStart=/usr/sbin/amavisd -c
/etc/amavisd/amavisd.conf (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/amavisd.service
            ├─12358 /usr/sbin/amavisd (master)
            ├─12382 /usr/sbin/amavisd (virgin child)
            ├─12383 /usr/sbin/amavisd (virgin child)
            ├─12384 /usr/sbin/amavisd (virgin child)
 [...]

Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12404]: entered
child_init_hook
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12403]:
SpamControl: init_child on SpamAssassin done
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12405]:
Net::Server: Child Preforked (12405)
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12405]: entered
child_init_hook
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12358]:
Net::Server: Parent ready for children.
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12404]:
SpamControl: init_child on SpamAssassin done
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12406]:
Net::Server: Child Preforked (12406)
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12406]: entered
child_init_hook
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12405]:
SpamControl: init_child on SpamAssassin done
Mar 30 15:09:19 mail.bordengrammar.kent.sch.uk amavis[12406]:
SpamControl: init_child on SpamAssassin done


Any mail processed during the restart seems to get bounced but amavisd
picks up where it left off and carries on working until the next restart
which is about 1-2 minutes after.

Any ideas would be helpful. I've been going through logs but can't find
anything that screams "problem's here".

Thanks,
Jools

On 2016-04-01 01:56, Stephen Davies wrote:
This sounds exactly like the behaviour I saw here until I stopped
using systemctl to start amavisd.

I can't see why systemctl makes amavisd restart every minute or so but
starting amavisd directly makes it behave normally.

Sounds like systemd's amavisd.service configuration is expecting
to run amavisd as a supervised process, but your amavisd configuration
makes amavisd run as a daemon, disassociating itself from the controlling
process.

Please see the release notes of the 2.11.0-RC
  ( https://amavis.org/release-notes.txt )
regarding running it under systemd as a supervised process.

  Mark

Reply via email to