重启后unbound无法启动

重启后unbound无法启动

我刚刚在全新安装的 Ubuntu16.04 VPS 上安装了 unbound。为确保万无一失,我发出了启用命令(这实际上是在安装过程中自动完成的)

sytemctl enable unbound

重新启动后,服务器无法启动,并且系统日志显示:

[...]
12:45:58 systemd[1]: Starting unbound.service...
12:45:58 unbound[1036]:  * Starting DNS server unbound
12:50:58 systemd[1]: unbound.service: Start operation timed out. Terminating.
12:50:58 systemd[1]: Failed to start unbound.service.
12:50:58 systemd[1]: unbound.service: Unit entered failed state.
12:50:58 systemd[1]: unbound.service: Failed with result 'timeout'.
12:55:01 unbound-anchor: /var/lib/unbound/root.key has content
12:55:01 unbound-anchor: success: the anchor is ok
[...]

此外,上次启动的“journalctl”显示了更多信息:

[...]
12:50:58 systemd[1]: unbound.service: Start operation timed out. Terminating.
12:50:58 systemd[1]: Failed to start unbound.service.
12:50:58 systemd[1]: Dependency failed for Host and Network Name Lookups.
12:50:58 systemd[1]: nss-lookup.target: Job nss-lookup.target/start failed with result 'dependency'.
12:50:58 systemd[1]: unbound.service: Unit entered failed state.
12:50:58 systemd[1]: unbound.service: Failed with result 'timeout'.
12:50:58 systemd[1]: Reached target Multi-User System.
[...]

当我随后手动发出

systemctl start unbound

然后 unbound 按预期启动并且系统日志显示:

12:58:32 systemd[1]: Starting unbound.service...
12:58:32 unbound[1268]:  * Starting DNS server unbound
12:58:34 unbound-anchor: /var/lib/unbound/root.key has content
12:58:34 unbound-anchor: success: the anchor is ok
12:58:34 unbound: [1284:0] notice: init module 0: validator
12:58:34 unbound: [1284:0] notice: init module 1: iterator
12:58:34 unbound: [1284:0] info: start of service (unbound 1.5.8).
12:58:34 unbound[1268]:    ...done.
12:58:34 systemd[1]: Started unbound.service.

该问题似乎与“nss-lookup”有关,我怀疑网络接口的速度不够快,但目前我不知道如何解决这个问题。

相关内容