命名服务无法启动 CentOS 7

命名服务无法启动 CentOS 7

通过 DirectAdmin 更新 CustomBuild 后,命名服务不再从我的 CentOS 7 服务器启动。我曾尝试通过 SSH 启动命名服务,但我不知道如何解决这个问题。我想我必须重新创建 vps.myname.nl.db,但该怎么做呢?

[root@vps ~]# /usr/bin/systemctl start named.service 2>&1
Job for named.service failed because the control process exited with error code.                                                                                         See "systemctl status named.service" and "journalctl -xe" for details.
[root@vps ~]# journalctl -xe
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone 1.0.0.127.in-addr.arpa/I
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone 0.in-addr.arpa/IN: loade
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone davps.axc.nl/IN: loaded
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone othername.nl/IN: loaded s
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone othernamedirect.nl/IN: lo
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone vps.myname.nl/I
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone vps.myname.nl/I
Apr 02 12:57:44 vps.myname.nl bash[1321]: _default/vps.myname.
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone anothername.eu/IN: lo
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone anotherothername.eu/IN: lo
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone andanothername.nl/IN: loaded
Apr 02 12:57:44 vps.myname.nl systemd[1]: named.service: control proces
Apr 02 12:57:44 vps.myname.nl systemd[1]: Failed to start Berkeley Inte
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
Apr 02 12:57:44 vps.myname.nl systemd[1]: Unit named.service entered fa
Apr 02 12:57:44 vps.myname.nl systemd[1]: named.service failed.
Apr 02 12:57:44 vps.myname.nl polkitd[515]: Unregistered Authentication
lines 2506-2528/2528 (END)
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone 0.in-addr.arpa/IN: loaded serial 0
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone davps.axc.nl/IN: loaded serial 2018020200
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone othername.nl/IN: loaded serial 2018020500
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone othernamedirect.nl/IN: loaded serial 2018020500
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone vps.myname.nl/IN: loading from master file /var/named/vps.myname.nl.db failed: file not found
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone vps.myname.nl/IN: not loaded due to errors.
Apr 02 12:57:44 vps.myname.nl bash[1321]: _default/vps.myname.nl/IN: file not found
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone anothername.eu/IN: loaded serial 2018111201
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone anotherothername.eu/IN: loaded serial 2018111201
Apr 02 12:57:44 vps.myname.nl bash[1321]: zone andanothername.nl/IN: loaded serial 2018111200
Apr 02 12:57:44 vps.myname.nl systemd[1]: named.service: control process exited, code=exited status=1
Apr 02 12:57:44 vps.myname.nl systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.

答案1

你是对的。由于缺少这个文件,系统无法启动/var/named/vps.myname.nl.db

您有多种选择:

  • 如果不需要,请从配置中删除此区域定义
    • 开始搜索/etc/named.conf或一些包含的 conf 文件
  • 创建空区域文件以便能够启动它
    • 最快的选择是跑步cp /var/named/named.empty /var/named/vps.myname.nl.db(请注意,该区域将是空的)
  • 创建空白区域(参见上一个项目符号),然后向新文件添加所需的记录

那么命名守护进程将能够启动

相关内容