ndc problem
Jim Reid
jim at rfc1035.com
Mon Jan 17 02:09:16 UTC 2000
>>>>> "Jim" == Jim Tinlin <jt at jumbo.surfari.net> writes:
Jim> BIND starts and runs fine, however ndc doesn't. When I first
Jim> start BIND, I get the following log entries:
Jim> Jan 16 15:32:25 cachecow named[28906]: unix control "/var/run/ndc" connect failed: Invalid argument
Jim> Jan 16 15:32:25 cachecow named[28906]: ctl_server: setsockopt(REUSEADDR): Operation not supported on transport endpoint
Jim> Jan 16 15:32:25 cachecow named[28906]: ctl_server: bind: Address already in use
Jim> This even happens when I re-boot the server. Now here's the
Jim> funny (?) part...I took a look at the file that ndc creates
Jim> in /var/run:
Jim> srw------- 1 root root 0 Nov 12 08:10 ndc=
Jim> The date is the last date that I restarted BIND *before* I
Jim> updated it... I compiled BIND on my server on 11/15...the
Jim> above date is 11/12! Now this is probably the root of the
Jim> problem, and how would I go about getting rid of this file
rm should delete this file provided nothing has it open at the
time. Even then, it should be deleted OK.
It looks like this file didn't get deleted by the previous version of
BIND that you ran. This was a known bug for some OS platforms.
Jim> (I've tried a number of things...nothing 'simple' seems to do
Jim> the trick)??? If I get rid of this, I assume ndc will create
Jim> another when it starts...which is why it's not starting
Jim> now...the ndc file already exists (but it thinks someone else
Jim> started it and won't continue).
This file is created by named, not ndc. ndc uses this socket to talk
to the name server. If the file exists - say because named didn't exit
properly - named gets very upset as you can see from the above error
messages. So you need to delete this file and restart the name
server.
BTW ndc doesn't "start" in the same sense and named starts. It's not a
1daemon process like named or inetd.ndc is used to to control the name
server: reload zones, re-read its config file, start, stop, etc,
etc. If you start the name server with ndc, it doesn't use the control
socket (/var/run/ndc or whatever) to talk to the name server. ndc
assumes that since it was told to start the name server, no named
process was already running and there's no point in using the control
socket. For one thing, the socket probably doesn't exist and even if
it did - like in your case - there's nothing listening on it.
More information about the bind-users
mailing list