Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very strange intermittent issue with BIND. I am running a redhat server (although my Gentoo boxes do the same thing periodically) and every once in awhile if you change the zone file in any way, it suddenly wont respond to queries. When you try:

dig @DNSServer localDomainHostName

it give you NXDOMAIN for a status. Now this has been happening for years, and it always seems to fix itself at some point, but it always seems to take different things to fix it.

One time I just had to change the owner of the file MYDOMAIN.db and MYDOMAIN.db.jnl to named:named from root:root. But for example today, that didn't do it. I know that my configuration is OK, since it has worked for months now without a hitch (they all do). But then I add one extra static A record to my MYDOMAIN.db file, and suddenly the whole thing stops responding to any localdomain queries. While still serving its forwarding role just fine.

What makes it even more confounding is that it doesnt seem to matter whether I use the redhat GUI for DNS, or if I use VI to edit the file in a bash prompt. Or which OS I'm using. Its one of the most elusive and annoying problems I have ever encountered.

Has anyone else ever encountered anything like what I'm talking about, or know any tricks to see where the system might be getting caught? Its starting to become annoying to have to just keep spending random afternoons resetting everything and messing with every file in sight until suddenly out of the blue it starts working again.

share|improve this question
    
Anything of interest in the nameserver logs? –  voretaq7 Apr 6 '11 at 18:30
    
Thats I think the strangest part. Its supposed to be (well I think that I understand what i'm reading here) saving debugging information into a file named named.run. But when I try to locate that file, I see nothing. And there is nothing in /var/log or /var/named/chroot/var/log/ which references the named server. I guess that is definitely the right first step, but I'm just confused as to why there is no logging at all. –  dynamphorous Apr 6 '11 at 18:44
    
Definitely check the logs. One of the things I always hated about bind is that if anything was wrong with a zone file, it'd bury a message about the error in the log and just run without loading the file. bind uses syslog for logging so the messages are probably in /var/log/messages or /var/log/daemon.log or the like –  DerfK Apr 6 '11 at 18:45
    
Check your bind configuration files and make sure logging is enabled (If it isn't, enable it ; if it is that will also tell you where the log messages are going) –  voretaq7 Apr 6 '11 at 18:46
    
Now I'm more confused than before. Voretaq I think that you are right about "enabling" the logging. However I just found (using the damnable GUI redhat provides) that it doesnt think that my /var/named/chroot/var/log folder is writable. So the whole time my logging has been directed to a non writable folder, which does explain allot. Since I have tried both root:named and named:named for owners, who is supposed to own that folder for it to be writable by my named deamon? –  dynamphorous Apr 6 '11 at 18:49

1 Answer 1

Well in this particular instance the problem was the lack of sync between the MYDOMAIN.db and MYDOMAIN.db.jnl. So getting rid of the jnl file allowed it to all work again. Its very odd to me that the jnl file somehow got out of sync. If there is a better way to add static hosts than just straight up modification of the MYDOMAIN.db file (or using the redhat GUI) I would love to know about it! But for now my problem is solved. Thank you for your help Voretaq7, and DerfK! I appreciate your time!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.