How to fix BIND’s journal out of sync error

This is a note for my future reference.

Example error:

zone example.com/IN: journal rollforward failed: journal out of sync with zone
zone example.com/IN: not loaded due to errors.

While named isn’t running, remove the .jnl file for the example.com zone. It will be in the same directory as the zone files. Restart named and the error should be gone.

This error occurs if you have dynamic entries (say pushed by in by a DHCP server or other automatic mechanism) in a zone and then also change the zone files on disk (say deploying updates from a manual edit).

To prevent this in the future, freeze a zone before changing the zone file, then thaw after.

rndc freeze example.com
vi /path/to/zonefile/example.com
rndc reload example.com
rndc thaw sxample.com

Where I learned about this: thedumbterminal.co.uk

This entry was posted in Other. Bookmark the permalink.