免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: leeda
打印 上一主题 下一主题

关于DNS设置问题,请大家指点 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2007-03-07 16:24 |只看该作者
07-Mar-2007 16:14:22.605 starting BIND 9.3.3 -g
07-Mar-2007 16:14:22.611 loading configuration from '/etc/named.conf'
07-Mar-2007 16:14:22.612 /etc/named.conf:43: unknown option 'zone'
07-Mar-2007 16:14:22.612 /etc/rndc.key:1: unknown option 'key'
07-Mar-2007 16:14:22.612 /etc/named.conf:51: '}' expected near end of file
07-Mar-2007 16:14:22.625 loading configuration: unexpected token
07-Mar-2007 16:14:22.625 exiting (due to fatal error)

另外大家帮我看看这是什么意思啊




现在named服务起不来拉
/sbin/service named restart
停止 named:rndc: connect failed: connection refused
[失败]

大家帮帮我啊~~~我怎么越弄越差啊~~

[ 本帖最后由 leeda 于 2007-3-7 16:37 编辑 ]

论坛徽章:
0
12 [报告]
发表于 2007-03-08 09:55 |只看该作者
你的/etc/name.d文件写得有问题,比如51行后少了一个},用vi编辑器:set nu可以看到行号的;当然还有其它错误。
另外你在/etc/resolv.conf最上面添加nameserver 202.106.0.20能用nslookup www.sina.com.cn查到sina的ip么?

论坛徽章:
0
13 [报告]
发表于 2007-03-08 10:34 |只看该作者
原帖由 leeda 于 2007-3-7 16:24 发表于 10楼  
07-Mar-2007 16:14:22.605 starting BIND 9.3.3 -g
07-Mar-2007 16:14:22.611 loading configuration from '/etc/named.conf'
07-Mar-2007 16:14:22.612 /etc/named.conf:43: unknown option 'zone'
07-Mar- ...

你的named.conf配置有错误。提示已经很清楚了。

论坛徽章:
0
14 [报告]
发表于 2007-03-08 12:14 |只看该作者
原帖由 vepeta 于 2007-3-8 10:34 发表于 12楼  

你的named.conf配置有错误。提示已经很清楚了。

我也知道提示是显示named.conf  里的zone内容有错误~但是你没看我的里面的配置文件啊~
我自己能找到这个错误就不用上来问XDJM们拉~
另外现在自我运行named -g后,named就起不来~
如:[root@szpic leeda]# /etc/init.d/named restart
停止 named:rndc: connect failed: connection refused
[失败]

论坛徽章:
0
15 [报告]
发表于 2007-03-08 12:16 |只看该作者
原帖由 FreeWare 于 2007-3-8 09:55 发表于 11楼  
你的/etc/name.d文件写得有问题,比如51行后少了一个},用vi编辑器:set nu可以看到行号的;当然还有其它错误。
另外你在/etc/resolv.conf最上面添加nameserver 202.106.0.20能用nslookup www.sina.com.cn查到s ...

XD,你说的51行?是哪里啊~我的配置文件里没有50多行啊~
请麻烦指点一下我的/etc/named.conf里面哪个地方配置错拉~
现在named服务都起不来拉~更加无法使用nslookup查询sina的IP拉~

论坛徽章:
0
16 [报告]
发表于 2007-03-08 12:31 |只看该作者
log明确显示named.conf第43行附近配置有错误,而你的文件没有完全贴出来,你得再仔细检查一下。

论坛徽章:
0
17 [报告]
发表于 2007-03-08 14:37 |只看该作者
[code:1:3da6231d18]
[root@szpic leeda]# nslookup 10.66.0.106
Server:         10.66.0.106
Address:        10.66.0.106#53

** server can't find 106.0.66.10.in-addr.arpa: SERVFAIL

[root@szpic leeda]# nslookup www.szpic.com
Server:         10.66.0.106
Address:        10.66.0.106#53

** server can't find www.szpic.com: SERVFAIL
[/code:1:3da6231d18]
为什么会这样啊~

[code:1:3da6231d18]
[root@szpic leeda]# /usr/local/sbin/named -g
08-Mar-2007 14:29:31.612 starting BIND 9.3.3 -g
08-Mar-2007 14:29:31.617 loading configuration from '/etc/named.conf'
08-Mar-2007 14:29:31.631 no IPv6 interfaces found
08-Mar-2007 14:29:31.631 listening on IPv4 interface lo, 127.0.0.1#53
08-Mar-2007 14:29:31.632 binding TCP socket: address in use
08-Mar-2007 14:29:31.632 listening on IPv4 interface eth0, 10.66.0.106#53
08-Mar-2007 14:29:31.633 binding TCP socket: address in use
08-Mar-2007 14:29:31.637 /etc/named.conf:19: couldn't add command channel 127.0.0.1#953: address in use
08-Mar-2007 14:29:31.638 ignoring config file logging statement due to -g option
08-Mar-2007 14:29:31.640 zone 0.66.10.in-addr.arpa/IN: loaded serial 2
08-Mar-2007 14:29:31.641 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
08-Mar-2007 14:29:31.643 zone szpic.com/IN: loaded serial 2
08-Mar-2007 14:29:31.644 zone localhost/IN: loaded serial 42
08-Mar-2007 14:29:31.645 running
08-Mar-2007 14:29:43.733 shutting down
08-Mar-2007 14:29:43.734 no longer listening on 127.0.0.1#53
08-Mar-2007 14:29:43.734 no longer listening on 10.66.0.106#53
08-Mar-2007 14:29:43.736 exiting
[/code:1:3da6231d18]
请大家指点啊~



named.conf 19行如下:
18    controls {
19            inet 127.0.0.1 allow { localhost; } keys { rndckey; };
20    };

[ 本帖最后由 leeda 于 2007-3-8 14:50 编辑 ]

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
18 [报告]
发表于 2007-03-08 14:41 |只看该作者
通常是少了 ; 這類的。
或許,你先用我之前寫的一個 script 來建立簡單的骨架,然後你再自己添肉如何:
http://bbs.chinaunix.net/viewthr ... &extra=page%3D2

论坛徽章:
0
19 [报告]
发表于 2007-03-08 16:44 |只看该作者
原帖由 飘雪心辰 于 2007-3-8 16:08 发表于 18楼  
==============================
第一,我急切得想知道你这台机子的操作系统发行版?
第二,

这个named.ca放根DNS地址,如果里面是空的,那么根据你的配置,就算配置文件正确也无法解析外部任何域名!
第三 ...

1.操作系统是 redhat9.0
2.已经在网上从新下载named.ca文件
3.我是新安装的bind-devel-9.2.1-16.i386.rpm      bind-utils-9.2.1-16.i386.rpm     bind-9.2.1-16.i386.rpm      caching-nameserver-7.2-7.noarch.rpm这几个套件。在安装前已经rpm -e bind移除系统自带的BIND。
4.不清楚有无使用CHROOT环境(因是菜鸟)
5.以下是我的一些配置文件~
[root@szpic named]# cat /etc/named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "szpic.com" IN {
        type master;
        file "szpic.com";
        allow-update { none; };
};

zone "0.66.10.in-addr.arpa" IN {
        type master;
        file "66.0.106.file";
        allow-update { none; };
};


include "/etc/rndc.key";
[root@szpic named]# cat /var/named/szpic.com
$TTL 86400
@ IN SOA szpic.com. root.szpic.com.(
2 ; serial
28800 ; refresh
7200 ; retry
604880 ; expiry
86400 ; minimum
)

@ IN NS szpic.com.
localhost IN A 127.0.0.1
www IN A 10.66.0.106

[root@szpic named]# cat /var/named/66.0.106.file
$TTL 86400
@ IN SOA szpic.com. root.szpic.com.(
2 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire

86400 ) ; Minimum



@ IN NS szpic.com.
7 IN PTR www.szpic.com.
[root@szpic named]# cat /etc/resolv.conf
domain szpic.com
#domain szpic.com
#nameserver 202.106.0.20
nameserver 10.66.0.106
search localhost
[root@szpic named]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhostdomain localhost
10.66.0.106     szpic.com       szpic

论坛徽章:
0
20 [报告]
发表于 2007-03-08 16:51 |只看该作者
原帖由 飘雪心辰 于 2007-3-8 16:08 发表于 18楼  
==============================
第一,我急切得想知道你这台机子的操作系统发行版?
第二,

这个named.ca放根DNS地址,如果里面是空的,那么根据你的配置,就算配置文件正确也无法解析外部任何域名!
第三 ...

现在使用named -g,又出现以下情况~
[root@szpic named]# /usr/local/sbin/named -g
08-Mar-2007 16:46:16.610 starting BIND 9.3.3 -g
08-Mar-2007 16:46:16.615 loading configuration from '/etc/named.conf'
08-Mar-2007 16:46:16.629 no IPv6 interfaces found
08-Mar-2007 16:46:16.630 listening on IPv4 interface lo, 127.0.0.1#53
08-Mar-2007 16:46:16.631 binding TCP socket: address in use
08-Mar-2007 16:46:16.631 listening on IPv4 interface eth0, 10.66.0.106#53
08-Mar-2007 16:46:16.632 binding TCP socket: address in use
08-Mar-2007 16:46:16.636 /etc/named.conf:19: couldn't add command channel 127.0.0.1#953: address in use
08-Mar-2007 16:46:16.636 ignoring config file logging statement due to -g option
08-Mar-2007 16:46:16.638 zone 0.66.10.in-addr.arpa/IN: loaded serial 2
08-Mar-2007 16:46:16.640 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
08-Mar-2007 16:46:16.641 zone szpic.com/IN: loaded serial 2
08-Mar-2007 16:46:16.643 zone localhost/IN: loaded serial 42
08-Mar-2007 16:46:16.644 running
08-Mar-2007 16:46:21.473 shutting down
08-Mar-2007 16:46:21.474 no longer listening on 127.0.0.1#53
08-Mar-2007 16:46:21.474 no longer listening on 10.66.0.106#53
08-Mar-2007 16:46:21.476 exiting
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP