我尝试在主 DNS 服务器和从属 DNS 服务器之间使用区域传输,但是无法启动命名服务并收到以下错误:
[root@balsam named]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2017-03-11 14:43:58 EST; 7s ago
Process: 2510 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 2440 ExecStart=/usr/sbin/named -u named $OPTIONS (code=exited, status=0/SUCCESS)
Process: 2550 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
Main PID: 2443 (code=exited, status=0/SUCCESS)
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: dns_rdata_fromtext: mydb-for-172.30.20:16: near 'pine.coniferous.trees.ops.': not a valid number
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: zone 20.30.172.in-addr.arpa/IN: loading from master file mydb-for-172.30.20 failed: not a valid number
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: zone 20.30.172.in-addr.arpa/IN: not loaded due to errors.
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: _default/20.30.172.in-addr.arpa./IN: not a valid number
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: zone ajfoncec.org/IN: loaded serial 2016010301
Mar 11 14:43:58 balsam.coniferous.trees.ops bash[2550]: zone 62.168.192.in-addr.arpa/IN: loaded serial 2016010301
Mar 11 14:43:58 balsam.coniferous.trees.ops systemd[1]: named.service: control process exited, code=exited status=1
Mar 11 14:43:58 balsam.coniferous.trees.ops systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Mar 11 14:43:58 balsam.coniferous.trees.ops systemd[1]: Unit named.service entered failed state.
Mar 11 14:43:58 balsam.coniferous.trees.ops systemd[1]: named.service failed.
这是什么意思?我似乎不明白。
以下是其提到的区域文件:
mydb-for-172.30.20
$TTL 3D
@ IN SOA balsam.coniferous.trees.ops. pine.coniferous.trees.ops.(
2016010301 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
1D ; Negative Cache TTL
);
@ IN NS balsam.coniferous.trees.ops.
1 IN PTR larch.coniferous.trees.ops.
2 IN PTR balsam.coniferous.trees.ops.
3 IN PTR spruce.coniferous.trees.ops.
5 IN PTR pine.coniferous.trees.ops.
6 IN PTR fir.coniferous.trees.ops.
8 IN PTR bristlecone.coniferous.trees.ops.
5 IN MX pine.coniferous.trees.ops.
另一个是 mydb-for-ajfoncec-org
$TTL 3D
@ IN SOA vm1.ajfoncec.org. hostmaster.ajfoncec.org.(
2016010301 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
1D ; Negative Cache TTL
);
@ IN NS vm1.ajfoncec.org.
vm1 IN A 192.168.62.2
vm2 IN A 192.168.62.3
vm3 IN A 192.168.62.4
host IN A 192.168.62.1
哦,还有 mydb-for-coniferous-trees-ops
$TTL 3D
@ IN SOA balsam.coniferous.trees.ops. pine.coniferous.trees.ops.(
2016010301 ; Serial
8H ; Refresh
2H ; Retry
1W ; Expire
1D ; Negative Cache TTL
);
@ IN NS balsam.coniferous.trees.ops.
balsam IN A 172.30.20.2
spruce IN A 172.30.20.3
pine IN A 172.30.20.5
fir IN A 172.30.20.6
bristlecone IN A 172.30.20.8
larch IN A 172.30.20.1
pine IN MX 0 172.30.20.5
答案1
从下面的 PTR 记录中删除此行:
5 IN MX pine.coniferous.trees.ops.
首先,反向区域不需要 MX 记录,没有人会向此类地址发送电子邮件。其次,它的格式不正确。
答案2
您的 MX 记录pine.coniferous.trees.ops.
缺少优先级编号。而且它一开始就没用,这是一个反向区域。
请花时间阅读错误消息并思考它们......
可能还有其他错误,但我在第一条错误消息时就停止阅读了。请再次检查您的文件。