View Full Version : Stopping domain name service: namedrndc: connect failed: connection refused
Finchwizard
10th April 2006, 07:59
I've just installed the Master DNS.
I did do what the comments said when I started the install with making the directory /var/lib/named/var/run/bind/run
The permissions on that directory are right, as well as the "-u bind -t /var/lib/named" in /etc/init.d/bind9
It was working, I've restarted, double and triple checked everything.
Can someone help before I throw the thing out the window.
till
10th April 2006, 08:46
Are you logged in as root, not sudo?
Finchwizard
11th April 2006, 01:05
Are you logged in as root, not sudo?
Yes, I'm using Debian 3.1, not Ubuntu or anything.
It seems to work, then when I try adding things to the config, it starts doing it again, after removing the lines I just added, and then restarting it again, it gives the same errors.
It gives the error if I stop or restart, yet it's fine if it just starts.
Finchwizard
11th April 2006, 01:45
After Regenerating the rndc key and changing named.conf to reflect it.
Also, looking in the /etc/init.d/bind9 script, shouldn't the other values be changed to the right paths?
case "$1" in
start)
echo -n "Starting domain name service: named"
modprobe capability >/dev/null 2>&1 || true
# dirs under /var/run can go away on reboots.
mkdir -p /var/lib/named/var/run/bind/run
chmod 775 /var/lib/named/var/run/bind/run
chown bind:bind /var/lib/named/var/run/bind/run >/var/lib/named/dev/null 2>&1 || true
if [ ! -x /usr/sbin/named ]; then
echo "named binary missing - not starting"
exit 1
fi
if start-stop-daemon --start --quiet --exec /usr/sbin/named \
--pidfile /var/lib/named/var/run/bind/run/named.pid -- $OPTIONS; then
if [ -x /sbin/resolvconf ] ; then
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
fi
fi
echo "."
;;
Something like that? To say where the PID file is and to recreate the /var/run/bind/run directory again?
I changed mine and it's seemed to have fixed it too.
Just wondering if that could be the problem
falko
11th April 2006, 15:44
It seems to work, then when I try adding things to the config, it starts doing it again, after removing the lines I just added, and then restarting it again, it gives the same errors.
It gives the error if I stop or restart, yet it's fine if it just starts.
When you edit named.conf, make sure you have a line break at the end, otherwise BIND won't start.
Finchwizard
12th April 2006, 01:04
I did have name breaks, just something was going weird and when I changed the other things in the init script they worked and I'm not having the problem as much.
Could also mention in the How To to make use of 'named-checkconf' it's handy for identifying those errors someone might have.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.