Bug Report from www.isc.org: Name: xmatt Email: c0ntr1but3@gmail.com Software Version: Centos 7 - BIND 9.9.4-RedHat-9.9.4-38.el7_3 (Extended Support Version) OS: Centos 7 - CentOS Linux release 7.3.1611 (Core) Subject:RNDC reload not actually loading zone(s) when run from crontab Bug Detail =========== The subject says mostly what the issue is. I can't be 100% sure this is an issue with BIND sorry, neither can I be 100% sure it's an issue with CentOS7 so I've raised a bug over there too - ID12729 (https://bugs.centos.org/view.php?id=12729) The problem is: When running "rndc reload" from crontab, it appears to work, but it does not actually load the zone. If you run it manually from the shell, it works fine. It doesn't matter which user (provided they have rights to do so) you use to run the command, it's always the same, it doesn't actually reload the zone. When checking /var/log/messages after running it manually there is always the following: Jan 27 21:13:43 named[87422]: received control channel command 'reload ' Jan 27 21:14:06 named[87422]: zone /IN/: loaded serial 2017012723 When checking the same after it runs through cron, there is always the following: Jan 27 20:28:04 named[87422]: received control channel command 'reload ' As you can see, there is no output to actually advise that the zone was reloaded. There is no NOTIFY sent to any Slave for this zone and the Slaves to not transfer a new copy of the zone after the REFRESH period specified in the SOA. Why? Because the zone wasn't realoded. If you check the zone file, it's "new". It has the updated SERIAL in the SOA and is good to go. If you then run "rndc reload" manually, all is well... This ONLY occurs when run from cron. Now, you might ask "have I running rndc reload without the zone at the end?". The answer is YES, started out like that. I added the zone to be more specific and in the hope it would work. It didn't. You might also ask, have you tried specifying the full path to the rncd binary? Indeed I have, makes no difference either. No matter what I've tried, when run from cron, it just doesn't reload the zone. Steps to reproduce: have bind-chroot installed. have a master zone. update the zone and increment the serial number. run rndc reload and check the logs, confirm output similar to: Jan 27 21:13:43 named[87422]: received control channel command 'reload ' Jan 27 21:14:06 named[87422]: zone /IN/: loaded serial do a "dig" at your zone with "dig -t SOA " and observe the SERIAL number returned matches that which you specified. Do the same again... update the zone with another change and increment the SERIAL this time, setup you "rndc reload" using "crontab -e". observe the logs and notice there is no second log entry (it sometimes takes a few secs to appear so be patient the first time). dig at your zone again as above, notice the SERIAL has not been incremented to that which is in the zone file you edited. --- This email was received through isc.org Bug Submission Form