rndc: connect failed: 127.0.0.1#953: connection refused [closed]
Asked Answered
R

5

16

This is a very annoying problem that i am having with the rndc reload

I am getting the following error:

rndc: connect failed: 127.0.0.1#953: connection refused

However the following work fine,

[root@cbgfx ~]# service named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]

[root@cbgfx ~]# tail -f /var/log/messages
Aug  7 12:51:09 cbgfx named[31990]: zone 120.88.167.in-addr.arpa/IN: loaded serial 14
Aug  7 12:51:09 cbgfx named[31990]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Aug  7 12:51:09 cbgfx named[31990]: zone domain.com/IN: domain.com/MX 'mail.servergreek.com' has no address records (A or AAAA)
Aug  7 12:51:09 cbgfx named[31990]: zone domain.com/IN: loaded serial 14
Aug  7 12:51:09 cbgfx named[31990]: zone localhost.localdomain/IN: loaded serial 0
Aug  7 12:51:09 cbgfx named[31990]: zone localhost/IN: loaded serial 0
Aug  7 12:51:09 cbgfx named[31990]: managed-keys-zone ./IN: loaded serial 4
Aug  7 12:51:09 cbgfx named[31990]: zone domain.com/IN: sending notifies (serial 14)
Aug  7 12:51:09 cbgfx named[31990]: zone 120.88.167.in-addr.arpa/IN: sending notifies (serial 14)
Aug  7 12:51:09 cbgfx named[31990]: running

The vps has ipv6 ip address, is there anything i missed here?

Thanks in advance guys

Reclamation answered 7/8, 2014 at 16:55 Comment(0)
R
13

I fixed it myself , it was a permission and ownership issue.To fix it you need to execute those ssh commands

Fix rndc connection refused error

chown root:named /etc/rndc.key

chmod 640 /etc/rndc.key

Reclamation answered 10/8, 2014 at 5:14 Comment(2)
or in ubuntu, chown root:bind /etc/bind/rndc.keyLabellum
This only worked for me after I restarted bind9. service bind9 restartHuneycutt
G
6

clear the file of directory /var/cache/bind/ and after in terminal bash /etc/bind/bind9 restart

Gehlenite answered 31/8, 2015 at 16:55 Comment(0)
C
2

The problem might not only be in rndc.key.

The easiest way to detect is running:

service named restart

Check if there is any error, if there is an error, run:

systemctl status named.service

Check any permission denied error. It could be in the log files as well.

Calumny answered 3/3, 2015 at 12:6 Comment(1)
In my case, I need to change permission to zone folder (named) to namedCalumny
A
0

In my case as bsentosa comment I needed start process named, you can enable to named start together within system

$ systemctl enable named
Autotomize answered 15/3, 2019 at 0:39 Comment(1)
Waht is "caso as bsentosa"? I think the question is poor quality already: Obviously when named is not running, you cannot tell it to reload. So the question should be "how do I start named"? IMHO too trivial to ask here...Terrazas
A
0

I am on Mac OS X (Ventura), with Bind9 installed through Brew. I ran into the same issue. I had to run named with sudo to make this error disappear: It was an ownership issue.

Also, you should pay attention to named logs, sometimes you have just errors in your *.zone file.

I hope it will help Mac users landing here.

Adda answered 24/1, 2023 at 5:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.