Search code examples
configurationfreebsdjailunbound

Unbound will restart, but will not reload


I am running unbound in a FreeBSD 11.3 jail, and have noted some behaviour that seems strange (at least to me!)

When restarting the unbound service, it works error-free:

service unbound restart

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

I have confirmed that it is all running a-ok and as expected.

However, when attempting to reload unbound (without a full restart) via unbound-control, it throws some config errors...

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

Does anyone know why a restart would work, yet a reload wouldn't? I have confirmed that the config being referenced is the same in both cases (by deliberately mis-formatting it to see if service unbound restart fails)

Thanks in advance :)


Solution

  • service unbound reload does work.

    It doesn't really 'fix' whatever the underlying bug is - but solves the problem for my use-case.

    Credit to @arrowd for the answer