All channels are configured for a specific log facility, however bind9 still logs to daemon.info and daemon.notice
Summary
All channels are configured for a specific log facility, however bind9 still logs to daemon.info and daemon.notice
Steps to reproduce
Configure logging and specify default_syslog and default_debug to use locale6, rather than file. All documented categories are also defined to use default_syslog only, including the default and unmatched as catchalls.
logging {
channel default_syslog {
print-time yes;
print-category yes;
print-severity yes;
syslog local6;
severity info;
};
// is anything usinig this by default?
channel default_debug {
print-time yes;
print-category yes;
print-severity yes;
syslog local6;
severity dynamic;
};
channel default_stderr {
null;
};
channel null {
// toss anything sent to this channel
null;
};
category client { default_syslog; };
category cname { default_syslog; };
category config { default_syslog; };
category database { default_syslog; };
category delegation-only { default_syslog; };
category dispatch { default_syslog; };
category dnssec { default_syslog; };
category edns-disabled { default_syslog; };
category general { default_syslog; };
category lame-servers { default_syslog; };
category network { default_syslog; };
category notify { default_syslog; };
category queries { default_syslog; };
category query-errors { default_syslog; };
category rate-limit { default_syslog; };
category resolver { default_syslog; };
category rpz { default_syslog; };
category security { default_syslog; };
category spill { default_syslog; };
category update { default_syslog; };
category update-security { default_syslog; };
category xfer-in { default_syslog; };
category xfer-out { default_syslog; };
// why doesn't this work - to redirect everything????
category unmatched { default_syslog; };
category default { default_syslog; };
};
options {
...
(How one can reproduce the issue - this is very important.)
What is the current bug behavior?
Some output is correctly directed to local6
Apr 11 12:24:26 local6.info: apu named[19291]: 11-Apr-2018 12:24:26.074 network: info: no longer listening on 192.168.201.1#53
Apr 11 12:24:26 local6.info: apu named[19291]: 11-Apr-2018 12:24:26.075 network: info: no longer listening on 192.168.202.1#53
Apr 11 12:24:26 local6.info: apu named[19291]: 11-Apr-2018 12:24:26.075 network: info: no longer listening on 192.168.203.1#53
Apr 11 12:24:26 local6.info: apu named[19291]: 11-Apr-2018 12:24:26.075 network: info: no longer listening on 192.168.204.1#53
Apr 11 12:24:26 local6.notice: apu named[19291]: 11-Apr-2018 12:24:26.105 general: notice: exiting
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.255 general: info: managed-keys-zone: journal file is out of date: removing journal file
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.256 general: info: managed-keys-zone: loaded serial 439
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.258 general: info: zone 0.in-addr.arpa/IN: loaded serial 1
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.272 general: info: zone 255.in-addr.arpa/IN: loaded serial 1
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.273 general: info: zone 127.in-addr.arpa/IN: loaded serial 1
Apr 11 12:24:26 local6.info: apu named[19307]: 11-Apr-2018 12:24:26.277 rpz: info: (re)loading policy zone 'rpz' changed from 0 to 2 qname, 0 to 0 nsdname, 0 to 0 IP, 0 to 0 NSIP, 0 to 0 CLIENTIP entries
But a lot of output is sent to rsyslod daemon.info and daemon.notice
Apr 11 12:22:03 daemon.info: apu systemd[1]: Started BIND Domain Name Server.
Apr 11 12:22:03 daemon.notice: apu named[19291]: starting BIND 9.10.3-P4-Debian <id:ebd72b3> -f -u bind
Apr 11 12:22:03 daemon.notice: apu named[19291]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--libdir=/usr/lib/x86_64-linux-gnu' '-
-infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--with-python=python3' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-l
ibtool' '--enable-shared' '--enable-static' '--with-gost=no' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--w
ith-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/x86_64-linux-gnu/softhsm/libs
ofthsm2.so' '--with-randomdev=/dev/urandom' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/bind9-VypbYM/bind9-9.10.3.dfsg.P4=. -fstack-protector-stron
g -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE -DDIG_SIGCHASE' 'LDFLAGS=-Wl,-z,relro
-Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
Apr 11 12:22:03 daemon.notice: apu named[19291]: ----------------------------------------------------
Apr 11 12:22:03 daemon.notice: apu named[19291]: BIND 9 is maintained by Internet Systems Consortium,
Apr 11 12:22:03 daemon.notice: apu named[19291]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Apr 11 12:22:03 daemon.notice: apu named[19291]: corporation. Support and training for BIND 9 are
Apr 11 12:22:03 daemon.notice: apu named[19291]: available at https://www.isc.org/support
Apr 11 12:22:03 daemon.notice: apu named[19291]: ----------------------------------------------------
Apr 11 12:22:03 daemon.notice: apu named[19291]: adjusted limit on open files from 4096 to 1048576
Apr 11 12:22:03 daemon.info: apu named[19291]: found 2 CPUs, using 2 worker threads
Apr 11 12:22:03 daemon.info: apu named[19291]: using 2 UDP listeners per interface
Apr 11 12:22:03 daemon.info: apu named[19291]: using up to 4096 sockets
Apr 11 12:22:03 daemon.info: apu named[19291]: loading configuration from '/etc/bind/named.conf'
...
Apr 11 12:22:03 daemon.info: apu named[19291]: automatic empty zone: B.E.F.IP6.ARPA
Apr 11 12:22:03 daemon.info: apu named[19291]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Apr 11 12:22:03 daemon.info: apu named[19291]: automatic empty zone: EMPTY.AS112.ARPA
Apr 11 12:22:03 daemon.info: apu named[19291]: configuring command channel from '/etc/bind/rndc.key'
Apr 11 12:22:03 daemon.notice: apu named[19291]: command channel listening on 127.0.0.1#953
Apr 11 12:22:03 daemon.info: apu named[19291]: configuring command channel from '/etc/bind/rndc.key'
Apr 11 12:22:03 daemon.notice: apu named[19291]: command channel listening on ::1#953
What is the expected correct behavior?
I expect only the configured channel (locale6 ) to be used.
Relevant configuration files
(Paste any relevant configuration files - please use code blocks (```)
to format console output. If submitting the contents of your
configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
named-checkconf -px
.)
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem.)