Bind is not logging

When I tried to debug bind (secondary dns no longer got updated), I noticed that my log file defined in /etc/bind/named.conf.local (within ‘logging’ section) was not found where it was supposed to be. Basically my named.conf.local file was like this:

channel simple_log {
file “/var/log/bind/bind9.log” versions 3 size 5m;
severity debug;
print-time yes;
print-severity yes;
print-category yes;
category default{

and no corresponding physical file was found, not even  /var/log/bind folder.

Looking at /var/log/syslog.conf, I found the following two lines:

Jul 27 19:30:34 stock named[12988]: logging channel ‘simple_log’ file ‘/var/log/bind/bind9.log’: file not found
Jul 27 19:30:34 stock named[12988]: isc_log_open ‘/var/log/bind/bind9.log’ failed: file not found

Incredibly, if you do not create the log file yourself, bind does not do it on its own.

To have bind perform required logging, simply create the appropriate log files and grant appropriate write rights to ‘bind’ user.
In my case, I ran:

  1. mkdir /var/log/bind9.log
  2. touch /var/log/bind/bind9.log
  3. chown bind /var/log/bind/bind9.log
  4. restart bind: /etc/init.d/bind9 restart


One Comment Trackback URL | Comments RSS

  1. Cass Says:

    Thanks for this, but your mkdir command should be mkdir /var/log/bind and not mkdir /var/log/bind9.log.

Post a Comment

Your email is never published nor shared. You're allow to say what you want...