1835200 Members
2323 Online
110077 Solutions
New Discussion

named didnt stop

 
SOLVED
Go to solution
Maaz
Valued Contributor

named didnt stop

Hi All

I m using RHL 9.0. I have Bind-9.2.1-16 intalled. Prblm is that I have to issue
'# killall -9 named' to stop the named server, because it dont stop working by issueing '# service named stop'

#service named start

#service named status
number of zones: 6
xfers running: 0
xfers deferred: 0
soa queris in progress: 0
querry logging is OFF
server is up and running

#service named stop

#service named start
server is already up and running

Second please also explain abt 'xfers running: 0' and 'xfers deferred: 0' that what are xfers ???

Many Thanks in Advance
7 REPLIES 7
Karthik S S
Honored Contributor

Re: named didnt stop

rm /var/run/named.pid
service named stop
service named start

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Jeroen Peereboom
Honored Contributor

Re: named didnt stop

xfers must be zone transfers to other (slave) nameservers.

JP
Robert Binkhorst
Trusted Contributor

Re: named didnt stop

Hi,

Bind can also be stopped/started with it's own programs:
ndc stop/start

That might give you an error message. If not, check your logfile in /var/log/named or whatever you have set this to. Also check /var/log/messages.

HTH,

Robert
linux: the choice of a GNU generation
Alexander Chuzhoy
Honored Contributor

Re: named didnt stop

This is a known bug that you can't stop the named service in redhat 9 using
service named stop .Nor the service named restart command will work.
Use kill to stop the service...
Maaz
Valued Contributor

Re: named didnt stop

Karthik S S, I didnt find /var/run/named.pid...anywayz thanks

Robert Binkhorst, I dont hava ndc on my system.. anywayz thanks

Alexender u informed me abt the actuall reason ... Many Thanks. Is there any patch available for for this bug???

Jeroen Peereboom, thanks for ur feedback abt xfers.

Many Thanks Again to u All
Stuart Browne
Honored Contributor
Solution

Re: named didnt stop

'ndc' is for bind 8 and before. 'rndc' is for bind 9.

As to whether this will work is a different question.

This is what 'service named stop' is supposed to do:

stop() {
# Stop daemons.
echo -n $"Stopping $prog: "
/usr/sbin/rndc stop
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named || {
killproc named
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
}
echo
return $RETVAL
}

First it tries using 'rndc' to nicely stop the name server. This fails, but fails neatly, meaning RETVAL is 0, instead of a faiulre value (of 1 or greater).

Unfortunately, this means that 'killproc' never gets called.

Quick solution would be to change this (in /etc/init.d) to be something simialr to:

stop() {
# Stop daemons.
echo -n $"Stopping $prog: "
killproc named
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/named
echo
return $RETVAL
}

i.e. not rely upon 'rndc' to do anything.

There hasn't been an eratta released Bind for RH9, but you could try pulling the Fedora BIND source rpm, and "rpmbild --rebuild" it yourself, see if that makes a difference. The fedora packages work correctly.

If you need steps on how to do this, drop a note.
One long-haired git at your service...
Maaz
Valued Contributor

Re: named didnt stop

Many Many Stuart Browne, I followed u and edit /etc/init.d/named, and now its doing fine, now I can service named stop|start|restart
Many Many Thanks.

Best Regards
Maaz