问题:
BIND启动的时候出现rndc: connect failed: connection refused 错误
# service named restart
停止 named:
启动 named: [ 确定 ]
或者是下面的错误:
#rndc status
rndc: connect failed: connection refused
分析办法(两个):
1)用下面命令查看日志,根据日志查找原因,了解配置文件加载成功与否!
#more /var/log/messages | grep named
日志如下:
[root@linuxserver named]# more /var/log/messages | grep named
Mar 27 16:26:30 linuxserver named[2220]: shutting down: flushing changes
Mar 27 16:26:30 linuxserver named[2220]: stopping command channel on 127.0.0.1#953
Mar 27 16:26:30 linuxserver named[2220]: no longer listening on 127.0.0.1#53
Mar 27 16:26:30 linuxserver named[2220]: no longer listening on 192.168.1.40#53
Mar 27 16:26:30 linuxserver named[2220]: exiting
Mar 27 16:26:30 linuxserver named: succeeded
Mar 27 16:26:33 linuxserver named[4877]: starting BIND 9.2.4 -u named -t /var/named/chroot
Mar 27 16:26:33 linuxserver named: named 启动 succeeded
Mar 27 16:26:33 linuxserver named[4877]: using 1 CPU
Mar 27 16:26:33 linuxserver named[4877]: loading configuration from '/etc/named.conf'
Mar 27 16:26:33 linuxserver named[4877]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 27 16:26:33 linuxserver named[4877]: listening on IPv4 interface eth0, 192.168.1.40#53
Mar 27 16:26:33 linuxserver named[4877]: command channel listening on 127.0.0.1#953
Mar 27 16:26:33 linuxserver named[4877]: zone 0.in-addr.arpa/IN: loaded serial 42
Mar 27 16:26:33 linuxserver named[4877]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Mar 27 16:26:33 linuxserver named[4877]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2007031700
Mar 27 16:26:33 linuxserver named[4877]: zone 255.in-addr.arpa/IN: loaded serial 42
Mar 27 16:26:33 linuxserver named[4877]: zone 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 1997022700
Mar 27 16:26:33 linuxserver named[4877]: talented.com.cn.dns:10: file does not end with newline
Mar 27 16:26:33 linuxserver named[4877]: zone talented.com.cn/IN: loaded serial 2007031700
Mar 27 16:26:33 linuxserver named[4877]: zone qfmy.tyut.edu.cn/IN: loaded serial 2007031700
Mar 27 16:26:33 linuxserver named[4877]: texsx.com.dns:10: file does not end with newline
Mar 27 16:26:33 linuxserver named[4877]: zone texsx.com/IN: loaded serial 2007031700
Mar 27 16:26:33 linuxserver named[4877]: zone localdomain/IN: loaded serial 42
Mar 27 16:26:33 linuxserver named[4877]: zone localhost/IN: loaded serial 42
Mar 27 16:26:33 linuxserver named[4877]: running
2)用命令查看rndc status
[root@linuxserver named]# rndc status
number of zones: 12
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running
若出现上面的状态 server is up and running说明启动成功!
阅读(2460) | 评论(0) | 转发(0) |