Bug #613

dns get out of synch

Added by ppmt almost 11 years ago. Updated about 9 years ago.

Target version:
Start date:
Due date:
% Done:




"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/ you can see

zone journal rollforward failed: journal out of sync with zone
zone 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

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


#1 Updated by cpg almost 11 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 almost 11 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/

zone loaded serial 1007210338
zone loaded serial 1007210338
client signer "ddnskey" approved
client updating zone '': adding an RR at '' A
client updating zone '': adding an RR at '' TXT
journal file dynamic/hda-n2a.conf.jnl does not exist, creating it
client signer "ddnskey" approved
client updating zone '': deleting rrset at '' PTR
client updating zone '': adding an RR at '' 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 :

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 over 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: suggests:

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

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 about 9 years ago

  • Priority changed from High to Normal

Also available in: Atom