QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 972|回复: 13

我配拉好几天的DNS拉,但就是测试不出来,那为大侠帮我看看我

[复制链接]
发表于 2004-12-27 15:36:07 | 显示全部楼层 |阅读模式
我配拉好几天的DNS拉,但就是测试不出来,那为大侠帮我看看我的系统日志
看看问题出在那,每次用host测试就显示
Host   www.king.com not  found:2  (SERVFAIL)
下面的是我的系统日志
Dec 27 14:59:38 ns 12月 27 14:59:38 named:  succeeded
Dec 27 06:59:40 ns named[7125]: starting BIND 9.2.2 -u named -t /var/named/chroot
Dec 27 06:59:40 ns named[7125]: using 1 CPU
Dec 27 06:59:40 ns named[7127]: loading configuration from '/etc/named.conf'
Dec 27 14:59:40 ns 12月 27 14:59:40 named: named 启动 succeeded
Dec 27 06:59:40 ns named[7127]: no IPv6 interfaces found
Dec 27 06:59:40 ns named[7127]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 27 06:59:40 ns named[7127]: listening on IPv4 interface eth0, 201.200.73.6#53
Dec 27 06:59:40 ns named[7127]: command channel listening on 127.0.0.1#953
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input
Dec 27 06:59:40 ns named[7127]: running
小弟在这先谢拉!
发表于 2004-12-27 17:27:56 | 显示全部楼层
将你的/etc/named和/var/named下的数据库挂出来看看。
回复

使用道具 举报

发表于 2004-12-27 17:49:29 | 显示全部楼层
语法错误一大堆:
[code:1]Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]

仔细检查named.conf的语法。
回复

使用道具 举报

发表于 2004-12-27 20:41:21 | 显示全部楼层
[quote:e9d8275383="bumingbai"]语法错误一大堆:
[code:1]Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 127.0.0.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 0.0.127.in-addr.arpa/IN: loading master file 127.0.0.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: 201.200.73.6.rev:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone 73.200.201.in-addr.arpa/IN: loading master file 201.200.73.6.rev: unexpected end of input
Dec 27 06:59:40 ns named[7127]: dns_master_load: king.zone:2: unknown RR type 'SOAking.com.'
Dec 27 06:59:40 ns named[7127]: zone king.com/IN: loading master file king.zone: unknown class/type
Dec 27 06:59:40 ns named[7127]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 27 06:59:40 ns named[7127]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]

仔细检查named.conf的语法。[/quote]
不是需要检查 named.conf 的语法,是需要检查 127.0.0.rev、201.200.73.6.rev、king.zone、和 localhost.zone 这几个文件的语法。
回复

使用道具 举报

发表于 2004-12-28 09:42:03 | 显示全部楼层
也就是将/var/named下的127.0.0.rev、201.200.73.6.rev、king.zone、和 localhost.zone 这几个文件的内容挂出来。
回复

使用道具 举报

 楼主| 发表于 2004-12-28 13:19:56 | 显示全部楼层
king.zone的数据库文件
$ttl 1D
@ IN SOA king.com. root.king.com. (
2004122100
3H
15M
1W
1D )
   IN NS ns.king.com.
   IN MX 5 mail.king.com.
localhost IN A 127.0.0.1
ns IN A  201.200.73.6
www IN A 201.200.73.6
ftp IN A 201.200.73.11
ns IN CNAME ns.king.com.
www IN CNAME www.king.com.
ftp IN CNAME ftp.king.com.

localhost.zone的数据库文件
$ttl 1D
@ 1D IN SOA @ root (
42
3H
15M
1W
1D )
    1D IN NS @
    1D IN A  127.0.0.1

201.200.73.6.rev的数据库文件
$ttl 1D
@ IN SOA ns.king.com. root.ns.king.com. (
2004122100
3H
15M
1W
1D )
    IN NS ns.king.com.
6   IN PTR ns.king.com.
6   IN PTR www.king.com.
11  IN PTR ftp.king.com.

127.0.0.rev的数据库文件
$ttl 1D
@ IN SOA localhost. root.localhost. (
2004122100
3H
15M
1W
1D )
   IN NS localhost.
1 IN PTR localhost.
多谢各为大侠的指点
回复

使用道具 举报

发表于 2004-12-28 13:46:45 | 显示全部楼层
[quote:31cb22c462="thizlinux"]king.zone的数据库文件
...
ns IN A  201.200.73.6
www IN A 201.200.73.6
ftp IN A 201.200.73.11
ns IN CNAME ns.king.com.
www IN CNAME www.king.com.
ftp IN CNAME ftp.king.com.

...[/quote]
ns IN A  201.200.73.6和www IN A 201.200.73.6重复定义,而且后面的CNAME又一次重复定义,应该这么写:
ns IN A  201.200.73.6
ftp IN A 201.200.73.11
www IN CNAME ns.king.com.
回复

使用道具 举报

 楼主| 发表于 2004-12-29 16:50:11 | 显示全部楼层
各位大侠,我照你们说的改拉,现在是正向的测试不好用显示
Host www.king.com not found:2 (SERVFAIL)
但反向的好用,测试结果和书上写的一样,但这还是不好用阿,
还有就是现在我用service  named  start或是/etc/rc.d/init.d/named  restart等命令启动服务器都不好用啦,系统啥提示也没有,还请各位大侠再帮帮我,让小弟将这个服务器弄明白,再次表示感谢!下面是我安各位说的改完后的系统日志,还是文件里有错误,但我按书上写的对拉一下,都一样,就是日期是我自己给的,和日期有没有关系我也不是很清楚,
Dec 29 16:05:40 localhost 12月 29 16:05:40 named: named 启动 succeeded
Dec 29 08:05:40 localhost named[3087]: no IPv6 interfaces found
Dec 29 08:05:40 localhost named[3087]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 29 08:05:40 localhost named[3087]: listening on IPv4 interface eth0, 201.200.73.6#53
Dec 29 08:05:40 localhost named[3087]: command channel listening on 127.0.0.1#953
Dec 29 08:05:40 localhost named[3087]: zone 0.0.127.in-addr.arpa/IN: loaded serial 2004122100
Dec 29 08:05:40 localhost named[3087]: zone 73.200.201.in-addr.arpa/IN: loaded serial 2004122100
Dec 29 08:05:40 localhost named[3087]: dns_master_load: king.zone:14: ftp.king.com: CNAME and other data
Dec 29 08:05:40 localhost named[3087]: zone king.com/IN: loading master file king.zone: CNAME and other data
Dec 29 08:05:40 localhost named[3087]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: zone localhost/IN: loading master file localhost.zone: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: running
Dec 29 08:05:40 localhost named[3087]: zone 73.200.201.in-addr.arpa/IN: sending notifies (serial 2004122100)
Dec 29 16:21:01 localhost kernel: application bug: xterm(4874) has SIGCHLD set to SIG_IGN but calls wait().
Dec 29 16:21:01 localhost kernel: (see the NOTES section of 'man 2 wait'). Workaround activated.
Dec 29 16:23:09 localhost kernel: application bug: xterm(4874) has SIGCHLD set to SIG_IGN but calls wait().
Dec 29 16:23:09 localhost kernel: (see the NOTES section of 'man 2 wait'). Workaround activated.
回复

使用道具 举报

 楼主| 发表于 2004-12-31 16:14:45 | 显示全部楼层
我顶一下,谢谢!
回复

使用道具 举报

发表于 2004-12-31 18:26:59 | 显示全部楼层
[code:1]Dec 29 08:05:40 localhost named[3087]: dns_rdata_fromtext: localhost.zone:2: near eol: unexpected end of input
Dec 29 08:05:40 localhost named[3087]: zone localhost/IN: loading master file localhost.zone: unexpected end of input [/code:1]

还是语法错,你看的是什么书?

你还是上www.redhat.com上去看看例子吧。
回复

使用道具 举报

发表于 2005-1-1 09:39:26 | 显示全部楼层
改正向解析文件 king.zone
改 IN NS ns.king.com. 为 IN NS king.com
或者改
@ IN SOA king.com. root.king.com.

@ IN SOA ns.king.com. root.ns.king.com.
回复

使用道具 举报

 楼主| 发表于 2005-1-5 12:09:42 | 显示全部楼层
你说的那个我都改过了,但还是不好用,
回复

使用道具 举报

 楼主| 发表于 2005-1-5 12:14:20 | 显示全部楼层
我说www.redhat.com这是个英文网站,能不能给个连接,就是说直接连到你说的那个范例的页面,谢谢!
回复

使用道具 举报

 楼主| 发表于 2005-1-7 15:58:53 | 显示全部楼层
ding
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-6 17:25 , Processed in 0.084161 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表