English
Ask Your Question
0

How to debug bind conf and zone files?

asked 2013-03-23 22:00:48 +0000

Ramy Al Zuhouri gravatar image

updated 2013-03-23 22:01:32 +0000

I am using bind 9.2 with fedora 17, trying to set up a DNS server. I've written 3 zone files and edited the resolv.conf and named.conf files. It seems like I've done extactly as the fedora guide says.

But if I try:

$ sudo systemctl start named.service

It says that the job failed. I also tried:

$ sudo systemctl status named.service

It gives an error, but it's not very indicative (it says status=failed, code=-1).

I would like to know how to debug the files, if there's a tool that says exactly the error that is causing named.service to don't start.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2013-03-24 13:20:45 +0000

Akshay gravatar image

You can use log files after starting/restarting bind to see error messages

tail –f /var/log/message

Check config file for errors

check config file syntax and /etc/named.conf file using following utilities. named-checkconf command is named (BIND) configuration file syntax checking tool.

named-checkconf /etc/named.conf

Check zone file syntax for errors

named-checkzone localhost /var/named/<filename>

OR

named-checkzone <hostname> /var/named/<filename>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2013-03-23 22:00:48 +0000

Seen: 12,051 times

Last updated: Mar 24 '13