Project

General

Profile

Bug #613

dns get out of synch

Added by ppmt over 10 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/20/2010
Due date:
% Done:

0%


Description

Problem:

"ping hda" doesn't work

"nslookup hda" points towards opendns missing page

"http://hda/ goes to an unknow page from opendns.

Basically DNS is not working for the hda domain.

After spending some time with cpg and maniro and other I am sure I eventually find out that the problem is related to
the dns table going out of synch.

in /var/named/data/named.run you can see

zone 0.21.172.in-addr.arpa/IN: journal rollforward failed: journal out of sync with zone
zone coolbreeze.com/IN: journal rollforward failed: journal out of sync with zone

A quick search on google with dns and "journal rollforward failed" points to some file .jnl that are
created wehn the table are not synchronised. This happens when the zone are edited while bind was not
stopped.

The fix is to delete the file .jnl in /var/named/dynamic and restarting the service

cpg also added that this apparently happens over a laps of time or at each reboot

History

#1 Updated by cpg over 10 years ago

since it happens at boot time, that may be a good way to debug.

how the service is being shutting down could be the problem.

#2 Updated by ppmt over 10 years ago

Now I am not sure anymore :(

I am playing with the DHCP to set some stic IP. and the problem occured again....So I fixed it and now I switch on my printer
to get its MAc so I can give it an IP and here is what I see in /var/named/data/named.run

zone 0.21.172.in-addr.arpa/IN: loaded serial 1007210338
zone coolbreeze.com/IN: loaded serial 1007210338
running
client 127.0.0.1#48040: signer "ddnskey" approved
client 127.0.0.1#48040: updating zone 'coolbreeze.com/IN': adding an RR at 'HPC5180.coolbreeze.com' A
client 127.0.0.1#48040: updating zone 'coolbreeze.com/IN': adding an RR at 'HPC5180.coolbreeze.com' TXT
journal file dynamic/hda-n2a.conf.jnl does not exist, creating it
client 127.0.0.1#53769: signer "ddnskey" approved
client 127.0.0.1#53769: updating zone '0.21.172.in-addr.arpa/IN': deleting rrset at '177.0.21.172.in-addr.arpa' PTR
client 127.0.0.1#53769: updating zone '0.21.172.in-addr.arpa/IN': adding an RR at '177.0.21.172.in-addr.arpa' PTR
journal file dynamic/hda-a2n.conf.jnl does not exist, creating it

So now the jnl files are created in /var/named/dynamic.

A good link is : http://www.bind9.net/manual/bind/9.3.1/Bv9ARM.ch04.html

look at chapter 4.2.1 it mention safe way of stopping dns to ensure data integrity using rndc stop

I waited for the 15 minutes they mention and I could see that the dynamic files were updated and still ping hda was still working

Edit: I can reproduce the problem....Switch on a device that will get an dynamic IP...then create a static IP address for that box.
For me this kill the dns with the error out of synch appearing in the logs

#3 Updated by eFfeM about 10 years ago

I'm new to amahi and also noticed this.
One of the cases it happens is when I installed a new app and the zone files were updated.

I did do some googling; some places suggest that the named should be stopped before changing the zone file
This article: http://www.webservertalk.com/archive69-2005-8-1186320.html suggests:

--- quote
You modified a dynamic zone by hand and didn't remove the
journal.

When named restarts it loads the zone then loads the journal
to reprocess any unconsolidated changes. While doing this it
discovered that the two files were no longer in sync.
--- end of quote

So maybe it suffices just to remove the .jnl files after updating the zone file.
Unfortunately I have no knowledge on how amahi updates it zone file so can't really propose a fix or test it.

As a workaround we might consider doing an rm /var/named/data/*.jnl in an init script so the journal file is nuked on a reboot.
(a somewhat safer solution could be to see if nslookup of hda delivers the local ip address. if not remove the file).

#4 Updated by bigfoot65 over 8 years ago

  • Priority changed from High to Normal

Also available in: Atom