DNS服务器启动,奇怪的问题
环境:centos5.6 bind9.3.6-16
1、用named-checkconf named.conf没有出错
2、用named -gc named.conf可以启动
3、用service named start无法启动。
4、用named -c named.conf启动之后,无法正常解析。
求高手
具体:
======================================
[root@localhost named]# pwd
/var/named
[root@localhost named]# cat named.conf
options {
version "unknown";
directory "/var/named";
allow-query { localhost; localnets; };
allow-recursion { localhost; localnets; };
allow-transfer { localhost; localnets; };
forwarders { 202.96.209.5; 202.96.209.133; };
};
controls {
inet 127.0.0.1 allow { localhost; } keys {rndckey;};
};
logging {
category lame-servers { null; };
};
view "internal" {
match-clients { localnets; };
recursion yes;
zone "." IN {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "1.168.192.in-addr.arpa";
};
zone "591773.cn" {
type master;
file "591773.cn.local";
};
};
include "/etc/rndc.key";
=======================================
[root@localhost named]# cat 0.0.127.in-addr.arpa
$TTL 86400
@ IN SOA ns1.51773.cn. root.51773.cn. (
2010050400 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; minimum
)
IN NS ns1.51773.cn.
1 IN PTR localhost.
=======================================
[root@localhost named]# cat 1.168.192.in-addr.arpa
$TTL 86400
@ IN SOA ns1.51773.cn. root.51773.cn. (
2010050400 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; minimum
)
IN NS ns1.51773.cn.
10 IN PTR 51773.cn.
=======================================
[root@localhost named]# cat 591773.cn.zone
$TTL 86400
@ IN SOA ns1.591773.cn. root.591773.cn. (
2010050400 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; minimum
)
IN NS ns1.591773.cn.
IN MX 10 mail.51773.cn.
@ IN A 67.195.160.199
ns1 IN A 67.195.160.199
www IN A 67.195.160.199
591773.cn. IN TXT "v=spf1 a mx ~all"
=====================================
[root@localhost named]# cat 591773.cn.local
$TTL 86400
@ IN SOA ns1.591773.cn. root.591773.cn. (
2010050400 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; minimum
)
IN NS ns1.591773.cn.
IN MX 10 mail.591773.cn.
@ IN A 192.168.1.10
ns1 IN A 192.168.1.10
www IN A 192.168.1.10
ftp IN A 192.168.1.10
mail IN A 192.168.1.10
=============================================
[root@localhost named]# ls -al
总计 112
drwxr-x--- 5 named named 4096 06-06 19:23 .
drwxr-xr-x 25 root root 4096 06-03 04:44 ..
-rwxr-xr-x 1 root root 244 06-05 22:52 0.0.127.in-addr.arpa
-rwxr-xr-x 1 root root 234 06-05 22:52 1.168.192.in-addr.arpa
-rwxr-xr-x 1 root root 390 06-05 22:52 591773.cn.local
-rwxr-xr-x 1 root root 366 06-05 22:52 591773.cn.zone
drwxr-x--- 6 root named 4096 06-03 07:52 chroot
drwxrwx--- 2 named named 4096 02-23 06:35 data
lrwxrwxrwx 1 root named 45 06-04 08:27 localdomain.zone -> /var/named/chroot//var/named/localdomain.zone
lrwxrwxrwx 1 root named 43 06-04 08:27 localhost.zone -> /var/named/chroot//var/named/localhost.zone
lrwxrwxrwx 1 root named 46 06-04 08:27 managed-keys.bind -> /var/named/chroot//var/named/managed-keys.bind
lrwxrwxrwx 1 root named 44 06-04 08:27 named.broadcast -> /var/named/chroot//var/named/named.broadcast
lrwxrwxrwx 1 root named 37 06-04 08:27 named.ca -> /var/named/chroot//var/named/named.ca
-rwxr-xr-x 1 root named 836 06-06 19:23 named.conf
lrwxrwxrwx 1 root named 44 06-04 08:27 named.ip6.local -> /var/named/chroot//var/named/named.ip6.local
lrwxrwxrwx 1 root named 40 06-04 08:27 named.local -> /var/named/chroot//var/named/named.local
lrwxrwxrwx 1 root named 39 06-04 08:27 named.zero -> /var/named/chroot//var/named/named.zero
drwxrwx--- 2 named named 4096 02-23 06:35 slaves
===============================================================
[root@localhost var]# ls -al
总计 204
drwxr-xr-x 25 root root 4096 06-03 04:44 .
drwxr-xr-x 23 root root 4096 06-06 18:57 ..
drwxr-xr-x 2 root root 4096 06-03 04:22 account
drwxr-xr-x 13 root root 4096 06-03 05:00 cache
drwxr-xr-x 2 root root 4096 03-07 09:02 crash
drwxr-xr-x 3 root root 4096 06-03 04:22 db
drwxr-xr-x 3 root root 4096 06-03 04:23 empty
drwxr-xr-x 3 root root 4096 06-03 04:44 ftp
drwxr-xr-x 2 root root 4096 2010-01-27 games
drwxrwx--T 4 root gdm 4096 06-05 22:03 gdm
drwxr-xr-x 35 root root 4096 06-03 05:00 lib
drwxr-xr-x 2 root root 4096 2010-01-27 local
drwxrwxr-x 6 root lock 4096 06-06 20:02 lock
drwxr-xr-x 18 root root 4096 06-06 20:02 log
lrwxrwxrwx 1 root root 10 06-03 04:18 mail -> spool/mail
drwxr-x--- 5 root named 4096 06-06 19:23 named
===============================================================
[root@localhost named]# named -gc named.conf
06-Jun-2011 21:11:53.825 starting BIND 9.3.6-P1-RedHat-9.3.6-16.P1.el5 -gc named.conf
06-Jun-2011 21:11:53.825 found 4 CPUs, using 4 worker threads
06-Jun-2011 21:11:53.825 using up to 4096 sockets
06-Jun-2011 21:11:53.830 loading configuration from '/var/named/named.conf'
06-Jun-2011 21:11:53.831 max open files (1024) is smaller than max sockets (4096)
06-Jun-2011 21:11:53.832 using default UDP/IPv4 port range: [1024, 65535]
06-Jun-2011 21:11:53.833 using default UDP/IPv6 port range: [1024, 65535]
06-Jun-2011 21:11:53.842 no IPv6 interfaces found
06-Jun-2011 21:11:53.842 listening on IPv4 interface lo, 127.0.0.1#53
06-Jun-2011 21:11:53.843 listening on IPv4 interface eth0, 192.168.1.3#53
06-Jun-2011 21:11:53.845 command channel listening on 127.0.0.1#953
06-Jun-2011 21:11:53.845 ignoring config file logging statement due to -g option
06-Jun-2011 21:11:53.845 zone 0.0.127.in-addr.arpa/IN/internal: loaded serial 2010050400
06-Jun-2011 21:11:53.845 zone 1.168.192.in-addr.arpa/IN/internal: loaded serial 2010050400
06-Jun-2011 21:11:53.846 zone 591773.cn/IN/internal: loaded serial 2010050400
06-Jun-2011 21:11:53.846 running
===============================================================
[root@localhost named]# service named restart
停止 named: [确定]
启动 named:
named配置错误::
zone 0.0.127.in-addr.arpa/IN: loading master file 0.0.127.in-addr.arpa: file not found
internal/0.0.127.in-addr.arpa/IN: file not found
zone 1.168.192.in-addr.arpa/IN: loading master file 1.168.192.in-addr.arpa: file not found
internal/1.168.192.in-addr.arpa/IN: file not found
zone 591773.cn/IN: loading master file 591773.cn.local: file not found
internal/591773.cn/IN: file not found
[失败]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
把这4个拷贝到chroot/var/named下看看
回复 2# chenyx
楼上的兄弟,谢谢了。
能够正常启动了,不过仍然无法解析。
可能是我的zone文件写得有问题。
继续检查日志