Bind and Newsyslog under FreeBSD

Walt Howard howard at rumba.ee.ualberta.ca
Thu Dec 11 20:04:52 UTC 2003


In article <bra1a4$16sf$1 at sf1.isc.org>,
Martin McCormick  <martin at dc.cis.okstate.edu> wrote:
>	Has anyone noticed that when running bind9 under FreeBSD, the
>logging dies when newsyslog runs and the day's log rolls over?
>
>	The work-around has been to have a cron job run just after
>newsyslog changes named's log which goes something like
>
>sleep 30;  /usr/local/sbin/rndc reload
>
>	That certainly gets the logging going again with only a loss
>of 30 seconds-worth of logging, but I am wondering if anything else
>can be done to make it work like it should?
>
>	I have noticed this for several years, but recently installed
>FreeBSD4.9 on a system and the latest version of bind9 and it still
>exhibits this behavior so I thought I'd say something about it.
>
>	In the overall scheme of things, it is a very minor annoyance.
>Named still works fine during the no-logging period, but the log file
>simply doesn't collect any new data.
>
Named is one of several programs (ntpd is another) whose logging is not
compatible with the log-rollover mechanism used by newsyslog.  Those
programs do not close their current logfile and open a new one upon
receipt of a signal, which is what newsyslog expects.  Ntpd also likes
to do its own logfile-name fiddling; at least named does not do that.

You can reduce the problem by using a log-rollover program that is able
to copy the existing logfile and then truncate it.  That way the named
program can continue to use the same file descriptor, which it wants to
do.  The logrotate program that comes with some Linux distributions is
suitable for rolling named log files.

-- 
Walt Howard                         /"\  ASCII Ribbon Campaign
InterNet: whoward at ieee.org          \ /  No HTML in mail or news!
BellNet: +1 780 492 6306             X
                                    / \


More information about the bind-users mailing list