Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498778 - =net-dns/unbound-1.4.21-r1 dies when trying to reload via SIGHUP
Summary: =net-dns/unbound-1.4.21-r1 dies when trying to reload via SIGHUP
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Proxy Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 11:57 UTC by Marc Schiffbauer
Modified: 2016-03-25 23:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer gentoo-dev 2014-01-21 11:57:45 UTC
When sending a SIGHUP to the unbound process it trys to reload its config and fails:

Jan 21 12:44:05 bart unbound: [32746:0] info: service stopped (unbound 1.4.21).
Jan 21 12:44:05 bart unbound: [32746:0] info: server stats for thread 0: 0 queries, 0 answers from cache, 0 recursions, 0 prefetch
Jan 21 12:44:05 bart unbound: [32746:0] info: server stats for thread 0: requestlist max 0 avg 0 exceeded 0 jostled 0
Jan 21 12:44:05 bart unbound: [32746:0] notice: Restart of unbound 1.4.21.
Jan 21 12:44:05 bart unbound: [32746:0] fatal error: Could not read config file: /unbound.conf


.. because it is missing the path to its config file.

For example the "openresolv" package makes use of this feature with the result that DNS will not work anymore until unbound is restarted manually everytime the DNS config changes (by dhcpd or openconnect for example).
(Because resolvconf is called which in turn will try to reload unbound via SIGHUP after writing a new config for it)

Current workaround is to specify a wrong PID file for unbound in /etc/resolvconf.conf so that resolvconf will restart the service instead of sending a SIGHUP to it:

# mschiff: workaround until unbound will not die anymore
# trying to find /unbound.conf as config when it is reloaded by SIGHUP
# (resolvconf will restart the service if pid file is not found...)
unbound_pid="/does/not/exist"
Comment 1 Marc Schiffbauer gentoo-dev 2016-03-25 23:16:04 UTC
I recent version of unbound this must be resolved by not chrooting unbound using the 'chroot: ""' setting. Closing.