Operating System - Linux
1752818 Members
4567 Online
108789 Solutions
New Discussion юеВ

rndc: connect failed: connection refused

 
SOLVED
Go to solution
'chris'
Super Advisor

rndc: connect failed: connection refused

I cannot start BIND 9 correctly and get following errors:

# /etc/init.d/bind9 restart
Stopping domain name service: namedrndc: connect failed: connection refused
.
Starting domain name service: namednamed: chroot(): No such file or directory
.
# rndc reload
rndc: connect failed: connection refused

knows someone what's wrong ?
I have Debian Sarge.

kind regards
chris
6 REPLIES 6
Stuart Browne
Honored Contributor
Solution

Re: rndc: connect failed: connection refused

For starters, '/etc/init.d/bind9 restart' ?

That's why you're getting the 'connection refused'. If you just 'start', you'll just get the 2nd error, 'chroot(): No such file or directory'.

What this means is that the directory being passed to the bind configuration (as argument '-t ') doesn't exist.

Are you expecting bind to start in a CHRoot jail?

If so, then find out what directory it's supposed to be CHRoot'd to, then make sure that the 'directory' (as listed in 'options' section of 'named.conf') exists beneath it (along with the 'named.conf', and associated device nodes).
One long-haired git at your service...
Sergejs Svitnevs
Honored Contributor

Re: rndc: connect failed: connection refused

Have You created null and random devices?
If not, try to execute:

mknod //dev/null c 1 3
mknod //dev/random c 1 8
chmod 666 //dev/null //dev/random

Regards,
Sergejs
'chris'
Super Advisor

Re: rndc: connect failed: connection refused

hi

I solved this problem.

1.) deinstalled lwresd
2.) deinstalled bind 9 and installed again with apt-get
3.) did all steps according to DNS Server section: http://www.projektfarm.com/en/support/debian_setup/
4.)
# cd /etc/bind
# rndc-confgen > rndc.conf
5.) open rndc.key and copy the secret hash
paste the secret hash from rndc.key to the rndc.conf.
6.) cut following lines from rndc.conf:

key "rndc-key" {
algorithm hmac-md5;
secret "nCikGvxO65EHAoi9kpn6aa==";

};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};

comment out and put them to named.conf


now it works without errors:
# /etc/init.d/bind9 restart
Stopping domain name service: named.
Starting domain name service: named.

# rndc status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running

greetings
chris
'chris'
Super Advisor

Re: rndc: connect failed: connection refused

have only a question:

why named.pif wasn't created ?
/var/lib/named/var/run is empty

at any others Bind 9 servers running on linux SUSE,
named.pif was created.
'chris'
Super Advisor

Re: rndc: connect failed: connection refused

sorry I've found it in:

/var/run/bind/run/named.pid
gerrychen
New Member

Re: rndc: connect failed: connection refused

how configure comment out and put rndc.conf to named.conf

I have a problem sam u .

# rndc reload
rndc: connect failed: connection refused