BIND DNS 服务器失败

BIND DNS 服务器失败

我在 Centos 上遇到了这个错误。如何解决这个问题?

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 Wed 2017-07-12 12:01:00 EDT; 15s ago
Process: 4728 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)

Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ns1.ringochat.com/IN: loaded serial 2013071600
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ns2.ringochat.com/IN: loaded serial 2013071600
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ringochat.com/IN: NS 'ns1.ringochat.com' has no address records (A or AAAA)
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ringochat.com/IN: NS 'ns2.ringochat.com' has no address records (A or AAAA)
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ringochat.com/IN: not loaded due to errors.
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: _default/ringochat.com/IN: bad zone
Jul 12 12:01:00 ns1.ringochat.com systemd[1]: named.service: control process exited, code=exited status=1
Jul 12 12:01:00 ns1.ringochat.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Jul 12 12:01:00 ns1.ringochat.com systemd[1]: Unit named.service entered failed state.
Jul 12 12:01:00 ns1.ringochat.com systemd[1]: named.service failed.

答案1

错误信息告诉您 - 您的名称服务器没有 A 记录。这意味着您可能托管自己的主名称服务器和辅助名称服务器,因此您还需要胶水记录。

Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ringochat.com/IN: NS 'ns1.ringochat.com' has no address records (A or AAAA)
Jul 12 12:01:00 ns1.ringochat.com bash[4728]: zone ringochat.com/IN: NS 'ns2.ringochat.com' has no address records (A or AAAA)

在你的区域文件中,你需要添加类似

ns1.ringochat.com.  IN   A  192.168.123.231
ns2.ringochat.com.  IN   A  192.168.123.232

然后使用以下命令检查区域文件

named-checkzone ringochat.com /path/to/zonefile

如果它报告加载正常(对于您的胶水记录服务器可能出现“忽略区域外信息”)则再次编辑,增加您的序列号,然后重新启动绑定。

相关内容