local_unbound, resolvconf, vpn

Alexander Zagrebin alex at zagrebin.ru
Wed Nov 8 12:17:18 UTC 2017


В Wed, 8 Nov 2017 13:38:28 +0200
Andriy Gapon <avg at FreeBSD.org> пишет:

> I've just enabled local_unbound on a machine and everything seems to
> work fine. But there are a few minor quirks that I would like to
> report.

> Last.  Every time I connect to a VPN (via vpnc or openvpn, for
> exmaple) the unbound daemon is restarted.  That's expected because
> its configuration is changed.  But there is a slightly annoying
> message that appears to be harmless: unbound: [7457:0] error: cannot
> chdir to directory:  (No such file or directory)
> 
> I wonder what causes this messages and if it's possible to shut it up.

This message appears because you are using chroot.
You have to edit /var/unbound/unbound.conf and add a trailing slash to
value of the 'directory' parameter:

server:
    ...
    chroot: /var/unbound
    directory: /var/unbound/
    ...

When unbound uses chroot, it determines the directory name, that it will
be use for chdir call, taking in account the value of 'chroot'
parameter. If 'chroot' equals 'directory' the unbound will call
chdir(''), which will cause an error.
 
-- 
Alexander Zagrebin


More information about the freebsd-net mailing list