How to fix BIND's journal out of sync error

Submitted by Tom Thorp on Wednesday, July 19, 2023 - 14:54
Modified on Wednesday, July 19, 2023 - 17:04
Dynamic DNS

If you use a Bind name server to dynamically update a zone record (say a DHCP IP address from a client), things can go awry if you manually update the zone file. Hence : 

zone journal rollforward failed: journal out of sync with zone
zone not loaded due to errors.

To clear the error, run Bind in diagnostic mode by executing the following command :

[fedora@ns ~]$ sudo named -g

Once you are satisfied that Bind is starting correctly, stop the running Bind service. 

[fedora@ns ~]$ sudo systemctl stop named-chroot

Remove any '.jnl' files that reside in the zone directory. 

[fedora@ns ~]$ sudo -i
[root@ns ~]$ cd /var/named/chroot/var/named
[root@ns named]$ rm *.jnl

If you have a dynamic zone, it is best to "freeze" the zone first, make the required edits, then "thaw" the zone afterwards to avoid this problem in future. The commands are as follows : 

// sudo rndc (freeze / reload / thaw) [zone] [in [view]]

[fedora@ns ~]$ sudo rndc freeze in trusted

// make the necessary edits to the zone file

[fedora@ns ~]$ sudo rndc reload in trusted
[fedora@ns ~]$ sudo rndc thaw in trusted



About the author

Tom Thorp
Tom Thorp is an IT Consultant living in Miami on Queensland's Gold Coast. With over 30+ years working in the IT industry, Tom's experience is a broad canvas. The IT services Tom provides to his clients, includes :
Website development and hosting
Database Administration
Server Administration (Windows, Linux, Apple)
PABX Hosting and Administration
Helpdesk Support (end-user & technical).
  If you like any of my content, consider a donation via Crypto by clicking on one of the payment methods :