Need to restart bind after reboot?

Check the difference between your distributions start code for BIND, and it's restart code for BIND.

Jeff
 
After some changes it's still not working. (It seems like rcconf made some changes because startips has moved from K20 to K02)
Named seems to be on K20 so that should be fine (I guess).

I'll try:
update-rc.d bind9 defaults 25 20

because I see bind9 on K02.
 
Last edited:
The only difference the K## makes is in which order a service gets shut down when either shutting down or rebooting your server, or when switching between runlevels (which we almost never do in a webserver).

Similarly, the differences in S## set the order in which a service gets started when starting (or restarting your server), or again when switching between runlevels (which, again, we amost never do in a webserver).

The startup order could conceivably make a difference, as it could start something else which would incorrectly use port 53, and thus keep the named daemon from starting on port 53.

When you start, restart, or kill, an individual service from the command line, neither makes any difference at all, as only one daemon is affected.

Note that the following information may be Red Hat Linux / CentOS specific:

For the most part servers should be running at runlevel 3. If your server is running at runlevel 5 you should probably switch to runlevel 3 unless you need X-Windows running on your server (generally only needed if you need a local login to your windowing system, and almost never recommended). For information on switching runlevels, if necessary, read man runlevel.

To check the runlevel on which your server is running, run this command in the shell:
Code:
$ runlevel
It should return either a single digit or the letter N followed by a space and another single digit. That last single digit is the runlevel.

Then determine the proper defaults for named
Code:
grep chkconfig /etc/init.d/named
On my Centos 5.x installations I get:
Code:
# chkconfig: - 55 45
The first number is what you should use in your runlevel directory to start BIND, and the second to stop BIND.

First check to see whether BIND is set to start automatically:
Code:
$ chkconfig --list named
Check for the runlevel you're running at, to see if it's set on or off. If it's off and you need to turn it on for the future, run:
Code:
$ chkconfig --level X named on
Note that this will not turn it on if it's off, but only change the settings for the future. You shold of course relace the X with your runlevel (either 3, or less desired [see above), 5).
This should turn it on, and set it for the default number it's supposed to use, as listed in the /etc/init.d/named file.

If this fix doesn't work for you, or if you can't or don't want to attempt it, you can hire me (or someone else) to work on your server for you.

To contact me for commercial services please use email; I don't respond to private messages here as promptly as I reply to email.

Jeff
 
Back
Top