Nsd.log rotation

Hello,

How do you rotate nsd.log? I'm under FreeBSD 10.3-STABLE with the
latest NSD 1.4.9 installed from ports, and trying to rotate
/var/log/nsd.log using newsyslogd:

-=nsd.conf=-

server:
        ip-address: 10.9.12.56
        do-ip4: yes
        do-ip6: no
        verbosity: 2
        chroot: "/usr/local/etc/nsd"
        zonesdir: "/usr/local/etc/nsd"
        zonelistfile: "zone.list"
        database: "var/db/nsd/nsd.db"
        logfile: "/var/log/nsd.log"
        pidfile: "var/run/nsd.pid"
        xfrdfile: "var/db/nsd/xfrd.state"
        xfrdir: "var/db/nsd/"
        hide-version: yes

-=newsyslog.conf=-

/var/log/nsd.log nsd:nsd 644 7 100 * Z
/usr/local/etc/nsd/var/run/nsd.pid 1

Sending 1 (HUP) to /usr/local/etc/nsd/var/run/nsd.pid doesn't seem to
have any effect -- the file is rotated but no new log entries added
afterwards:

% ls -al /var/log/nsd.log*
-rw-r--r-- 1 nsd nsd 90 May 23 10:00 /var/log/nsd.log
-rw-r--r-- 1 nsd nsd 50668 May 23 10:00 /var/log/nsd.log.0.gz

# cat /var/log/nsd.log
May 23 10:00:00 ns-feeder newsyslog[59218]: logfile turned over due to size>100K

Is this because of the chroot? Do I need to fire 'nsd-control
log_reopen' instead?

Thank you.

Roman Serbski:

How do you rotate nsd.log?

I let "logfile:" empty and let syslog+logrotate do the job.

-- man nsd.conf ---
        logfile: <filename>
               Log messages to the logfile. The default is to log to stderr and
               syslog (with facility LOG_DAEMON).

Andreas

Thanks. Any changes required in syslog.conf?

With logfile: commented out I only get xfrd messages logged to
/var/log/messages. For example:

May 26 11:48:37 ns-feed nsd[68100]: xfrd: zone domain.org: max notify
send count reached, 192.168.0.10 unreachable

But no traces of any info or error messages like the ones below:

[2016-05-25 17:39:26.692] nsd[65936]: error: xfrd: zone domain.org:
max notify send count reached, 192.168.0.10 unreachable
[2016-05-25 17:44:03.301] nsd[65938]: info: axfr for domain.org. from
192.168.0.10