[33393] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Krb5 servers writing to old rotated log files

daemon@ATHENA.MIT.EDU (Jason L Tibbitts III)
Tue May 17 11:17:37 2011

From: "Jason L Tibbitts III" <tibbs@math.uh.edu>
To: Jaap Winius <jwinius@umrk.nl>
Date: Tue, 17 May 2011 10:10:50 -0500
In-Reply-To: <20110517164005.19142rjbkzelr3s4@bitis.umrk.nl> (Jaap Winius's
	message of "Tue, 17 May 2011 16:40:05 +0200")
Message-ID: <ufaoc31l5vp.fsf@epithumia.math.uh.edu>
MIME-Version: 1.0
Cc: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

>>>>> "JW" == Jaap Winius <jwinius@umrk.nl> writes:

JW> Hi folks, On all of the Debian squeeze servers with Kerberos
JW> (v1.8.3) that I manage, I've noticed that the Kerberos daemons start
JW> out writing to their designated log files, e.g. kdc.log, but once
JW> those log files are rotated they ignore the new empty ones and
JW> instead prefer to write only to the first rotated files,
JW> e.g. kdc.log.1.

Well, I'm sure they just keep logging to the files they have open.  The
fact that you changed the names of those files doesn't have any bearing
on that.

You need to send -HUP to the daemons to get them to close and reopen
their logs.  I would expect most Linux distributions to do this for you;
for example, Fedora has snippets in /etc/logrotate.d:

/var/log/kadmind.log {
    missingok
    notifempty
    monthly
    rotate 12
    postrotate
        /bin/kill -HUP `cat /var/run/kadmind.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

/var/log/krb5kdc.log {
    missingok
    notifempty
    monthly
    rotate 12
    postrotate
        /bin/kill -HUP `cat /var/run/krb5kdc.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

 - J<
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post