Re: restart named; missing TCP socket

2012-12-13 Thread Kevin Oberman
On Wed, Dec 12, 2012 at 6:04 AM, Tony Finch  wrote:
> Mark Andrews  wrote:
>>
>> You need to wait for named to stop
>>
>> p=`rndc stop -p | awk '{print $2}'`
>> while kill -0 $p
>> do
>>   sleep 1
>> done
>> /etc/rc.d/rc.named start

This looks like FreeBSD.  If so, just use 'service named restart' for
newer versions of FreeBSD. If the service command is not available,
you can use '/etc/rc.d/named restart'. It wil properly stop named and
then restart it.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6...@gmail.com
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: restart named; missing TCP socket

2012-12-12 Thread Tony Finch
Mark Andrews  wrote:
>
> You need to wait for named to stop
>
> p=`rndc stop -p | awk '{print $2}'`
> while kill -0 $p
> do
>   sleep 1
> done
> /etc/rc.d/rc.named start

Thanks.

Tony.
-- 
f.anthony.n.finchhttp://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: restart named; missing TCP socket

2012-12-12 Thread Mark Andrews

In message , Tony F
inch writes:
> I have had a few instances recently when named has failed to re-open its
> TCP listening socket after a restart. This is particularly likely if I
> try to bounce it quickly with a command line like
> 
> # rndc stop; /etc/rc.d/rc.named start

You need to wait for named to stop

p=`rndc stop -p | awk '{print $2}'`
while kill -0 $p
do
sleep 1
done
/etc/rc.d/rc.named start
 
> The servers in question are recursive (apart from a few local zones) with
> simple ACLs. (I have had the same problem on servers with less simple
> ACLs too.)
> 
>   listen-on-v6   { ::1; };
>   listen-on  { 127.0.0.1; };
>   allow-query{ localhost; };
>   allow-transfer { localhost; };
> 
> What do others do to avoid this problem?
> 
> Tony.
> -- 
> f.anthony.n.finchhttp://dotat.at/
> Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
> Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
> occasionally poor at first.
> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
>  from this list
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


RE: restart named; missing TCP socket

2012-12-12 Thread Lightner, Jeff
Why use rndc to stop then the init script to start?   Is there no 
/etc/rc.d/rc.named restart?   On RHEL5 the init script has a restart option so 
it will stop then start.

If a socket is open then it could take a finite amount of time for it to close 
making it unavailable on the restart if you haven't given it time enough to 
cleanup.

If no restart option in init maybe try to add a sleep to your command line:
Rndc stop;sleep 5;/etc/rc.d/rc.named start





-Original Message-
From: bind-users-bounces+jlightner=water@lists.isc.org 
[mailto:bind-users-bounces+jlightner=water@lists.isc.org] On Behalf Of Tony 
Finch
Sent: Wednesday, December 12, 2012 8:20 AM
To: bind-users@lists.isc.org
Subject: restart named; missing TCP socket

I have had a few instances recently when named has failed to re-open its TCP 
listening socket after a restart. This is particularly likely if I try to 
bounce it quickly with a command line like

# rndc stop; /etc/rc.d/rc.named start

The servers in question are recursive (apart from a few local zones) with 
simple ACLs. (I have had the same problem on servers with less simple ACLs too.)

listen-on-v6   { ::1; };
listen-on  { 127.0.0.1; };
allow-query{ localhost; };
allow-transfer { localhost; };

What do others do to avoid this problem?

Tony.
--
f.anthony.n.finchhttp://dotat.at/ Forties, Cromarty: East, 
veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good, 
occasionally poor at first.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users




Athena(r), Created for the Cause(tm)
Making a Difference in the Fight Against Breast Cancer

-
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential 
information and is for the sole use of the intended recipient(s). If you are 
not the intended recipient, any disclosure, copying, distribution, or use of 
the contents of this information is prohibited and may be unlawful. If you have 
received this electronic transmission in error, please reply immediately to the 
sender that you have received the message in error, and delete it. Thank you.
--

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users