amavisd logrotate

Alain Spineux aspineux at gmail.com
Tue Apr 29 14:33:55 CEST 2008


On Tue, Apr 29, 2008 at 10:51 AM, Tobias Oed <tobias.oed at octant-fr.com> wrote:
> Hello,
>  for the second day in a row, amavis fails to restart properly
>  after its logs are being rotated. This is the end of the
>  previous log amavisd.log.0: (edited a bit for better readability)
>
>  Apr 29 00:00:20 /kolab/sbin/amavisd[890]: (00890-04) Not-Delivered, ...
>  Apr 29 00:00:20 /kolab/sbin/amavisd[890]: (00890-04) Blocked SPAM, ...
>  Apr 29 00:00:56 /kolab/sbin/amavisd[18202]: Net::Server:
>    2008/04/29-00:00:56 Server closing!
>  Apr 29 00:02:28 /kolab/sbin/amavisd[882]: (00882-04) SMTP shutdown:
>    tempdir is being removed:
>    /kolab/var/amavisd/amavis-20080428T235819-00882
>  Apr 29 00:02:28 /kolab/sbin/amavisd[890]: (00890-04) SMTP shutdown:
>    tempdir is being removed:
>    /kolab/var/amavisd/amavis-20080428T235828-00890
>
>  And this is the beginning of the new log amavisd.log:
>
>  Apr 29 00:01:00 /kolab/sbin/amavisd[3014]: starting.
>    /kolab/sbin/amavisd at kolab.bonneterie.com amavisd-new-2.3.3
>    (20050822), Unicode aware, LC_ALL=C, LC_CTYPE=C, LANG=C
>  Apr 29 00:01:00 /kolab/sbin/amavisd[3014]: user=19415, EUID: 19415
>    (19415);  group=, EGID: 19415 19415 (19415 19415)
>  Apr 29 00:01:00 /kolab/sbin/amavisd[3014]: Perl version
>    5.008007
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3014]: INFO: no optional modules:
>    Sys::Hostname::Long Mail::SPF::Query Net::CIDR::Lite
>    Mail::SpamAssassin::Plugin::DomainKeys Mail::DomainKeys::Header
>    Mail::DomainKeys::Message Mail::DomainKeys::Policy
>    Mail::DomainKeys::Signature Mail::DomainKeys::Key
>    Mail::DomainKeys::Key::Public IP::Country::Fast
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server: Process
>    Backgrounded
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server:
>    2008/04/29-00:01:05 Amavis (type Net::Server::PreForkSimple) starting!
>    pid(3019)
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server: Binding to UNIX
>    socket file /kolab/var/amavisd/amavisd.sock using SOCK_STREAM
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server: Binding to TCP
>    port 10024 on host 127.0.0.1
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server:
>    2008/04/29-00:01:05 Can't connect to TCP port 10024 on 127.0.0.1
>    [Address already in use]\n  at line 88 in file
>    /kolab/lib/perl/vendor_perl/5.8.7/Net/Server/Proto/TCP.pm
>  Apr 29 00:01:05 /kolab/sbin/amavisd[3019]: Net::Server:
>    2008/04/29-00:01:05 Server closing!
>
>  So the old instance hasen't quit yet while the new one is already
>  started. When this one tries to bind to its socket it fails because it's
>  already in use.

Which OS are you running ?
Do you have this problem when you run this commend too ?
# openpkg rc amavisd restart
And when running this one (without the implicit sleep )
# openpkg rc amavisd stop start

>  Anyone seen this before? What can I do to prevent this from happening?

in /kolab/etc/rc.d/rc.amavisd, you could try to increase the sleep
time, here sleep 2

%restart -u root
    rcService amavisd enable yes || exit 0
    rcService amavisd active no && exit 0
    rc amavisd stop
    sleep 2
    rc amavisd start

Please tell us if increasing the sleep time as solved your problem ?
If this is a problem with the socket option "reuse_address"
you should use a sleep time > 30sec  maybe more.



>  (yesterday it took 6h to catch up on old mails).
>
>  Tobias Oed
>
>  --
>  *Tobias Oed* - Octant Informatique <http://www.octant-fr.com>
>  contact | tobias.oed at octant-fr.com <mailto:tobias.oed at octant-fr.com> -
>  04 76 50 82 38
>
>  _______________________________________________
>  Kolab-users mailing list
>  Kolab-users at kolab.org
>  https://kolab.org/mailman/listinfo/kolab-users
>



-- 
Alain Spineux
aspineux gmail com
May the sources be with you




More information about the users mailing list