Results 1 to 6 of 6
Thread: rndc reload cron.. Need help!
-
07-07-2005, 02:22 PM #1Junior Guru
- Join Date
- Dec 2004
- Posts
- 224
rndc reload cron.. Need help!
Hello,
I have a CentOS release 3.5 server. Everytime a new account is added, it does not start resolving by itself until I manually reload rndc through shell.
I was looking for a cron that can reload it every 1min to 5 min.
I tried the following:
* * * * * /usr/sbin/rndc reload
and
* * * * * /scripts/reloadrndc
where /scripts/reloadrndc has:
#!/bin/bash
/usr/sbin/rndc reload
None of these crons are reloading it. The crons are working fine otherwise.
tail -f /var/log/cron shows "Jul 8 01:24:00 ser CROND[22830]: (root) CMD (/usr/sbin/rndc reload)" every minute.
But rndc is not getting reloaded.. please help!
-
07-07-2005, 02:54 PM #2Junior Guru
- Join Date
- May 2001
- Location
- Houston, TX
- Posts
- 195
Is the manual reload working from shell at this point? Check the log for any file configuration errors popping up.
Are you using the /var/spool/cron directory for this cron entry? If so, try using the /etc/crontab file and restart crond to see if there is any difference.
-
07-07-2005, 03:08 PM #3Junior Guru
- Join Date
- Dec 2004
- Posts
- 224
Hello,
I used "crontab -e" for adding the cron. And manually I can run "/usr/sbin/rndc reload" as well as "/scripts/reloadrndc" without any issue and that updates named and sites work fine.
But when I run it through cron named doesnot get updated at all!
I find it so strange..
-
07-08-2005, 12:06 AM #4Junior Guru
- Join Date
- Dec 2003
- Location
- Sunny So. Calif.
- Posts
- 213
Try modifying your crontab to look like:
*/5 * * * * /scripts/reloadrndc
which will be every '5' minutes or use '*/3' for every '3' minutes.
On some boxes, I have had to do:
*/5 * * * * /scripts/reloadrndc.sh
(notice the .sh)
Make sure your script perms include exec and are owned by root.
Check your cron logs to see if there are any errors being reported when trying to run the script.
-
07-09-2005, 08:35 AM #5Junior Guru
- Join Date
- Dec 2004
- Posts
- 224
Thanks for the suggestion..
But its still the same. I renamed the scrip to "reloadrndc.sh".
The cronoutput doesnt show any error either.
Cron runs every two minutes now. Thats what the cron log says. Also I tried adding a line after the rndc reload command to "wall test".. that worked too.. But rndc doesnt get reloaded!!
Any ideas??
-
07-09-2005, 08:50 AM #6Junior Guru
- Join Date
- Dec 2004
- Posts
- 224
The cron still didnt work!! But the issue with rndc reload is corrected. Just do the following:
mv /lib/tls /lib/tls.disable
/scripts/restartsrv_named
And the newly added acounts should resolve fine without having to reload rndc manually.. which was my issue for which I was trying to set up a cron to reload rndc..
But still.. why doesnt rndc reload thru cron??!! Still cant get that.. If anyone knows, please do post it here
Thanks!