0

unbound在 FreeBSD 11.3 监狱中运行,并注意到一些看起来很奇怪的行为(至少对我来说!)

重新启动未绑定服务时,它可以正常工作:

service unbound restart

# Stopping unbound.
# Waiting for PIDS: 80729.
# Obtaining a trust anchor...
# Starting unbound.

我已经确认一切正常并且如预期的那样运行。

但是,当尝试通过 重新加载未绑定(没有完全重启)时unbound-control,它会引发一些配置错误......

unbound-control -c /usr/local/etc/unbound/unbound.conf reload

# /usr/local/etc/unbound/mnt/config/unbound.conf:25: error: unknown keyword 'log-replies'
# /usr/local/etc/unbound/mnt/config/unbound.conf:25: error: stray ':'
# /usr/local/etc/unbound/mnt/config/unbound.conf:25: error: unknown keyword 'yes'
# /usr/local/etc/unbound/mnt/config/unbound.conf:27: error: unknown keyword 'log-tag-queryreply'
# /usr/local/etc/unbound/mnt/config/unbound.conf:27: error: stray ':'
# /usr/local/etc/unbound/mnt/config/unbound.conf:27: error: unknown keyword 'yes'
...
...
...
# read /usr/local/etc/unbound/unbound.conf failed: 20 errors in configuration file
# [1594189698] unbound-control[37432:0] fatal error: could not read config file

有谁知道为什么重启会起作用,但重新加载不会?我已经确认在两种情况下引用的配置都是相同的(故意错误格式化它以查看是否service unbound restart失败)

提前致谢 :)

4

1 回答 1

3

service unbound reload确实有效。

无论潜在的错误是什么,它都不能真正“修复” - 但为我的用例解决了问题。

归功于@arrowd 的答案

于 2020-07-08T08:05:11.133 回答