Chapter 10. Logging and Troubleshooting


BIND name servers, particularly busy ones, can log a tremendous volume of messages. Many administrators are so cowed by the quantity of messages that they simply abandon trying to track them. Knowing how to sift and sort the messages, as described in Recipes Section 10.4 to Section 10.9, can help you keep up.

The recipes later in the chapter describe how to use dig, the Swiss Army Knife of DNS query tools. The latest versions of dig will trace name resolution, send TSIG-signed queries and more, all with a few command-line options.

Finding a Syntax Error in a named.conf File


You need to find a syntax error in a name server’s named.conf file.


If you suspect you have a syntax error in named.conf, check the name server’s syslog output to see if named logged any error messages the last time you started or reloaded it. Look for a message like this, indicating the last time you started the name server:

Jun 25 15:42:43 ns1 named[53702]: starting BIND 9.2.1
Jun 25 15:42:43 ns1 named[53702]: using 1 CPU
Jun 25 15:42:43 ns1 named[53702]: loading configuration from '/etc/named.conf'

If you reloaded the name server, the message will look like this:

Jun 25 15:44:25 ns1 named[53702]: loading configuration from '/etc/named.conf'

If you can’t find the last time the name server was started or reloaded, you can always reload it again with rndc reload (BIND 9) or ndc reload (BIND 8), then check named’s syslog output immediately. Or you ...

Get DNS & BIND Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.