local-unbound: warning: so-sndbuf 4194304 was not granted, got 9216
I migrated our 14.4-STABLE syslog server to a XCP-ng VM, and noticed local-unbound made loud complaints.
# service local_unbound start Starting local_unbound. [1776086385] local-unbound[3426:0] warning: setsockopt(..., SO_SNDBUF, ...) was not granted: No buffer space available [1776086385] local-unbound[3426:0] warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: start with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd) values. or set so-sndbuf: 0 (use system value). [1776086385] local-unbound[3426:0] warning: setsockopt(..., SO_SNDBUF, ...) was not granted: No buffer space available [1776086385] local-unbound[3426:0] warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: start with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd) values. or set so-sndbuf: 0 (use system value). Waiting for nameserver to start... good
I ended up creating /var/unbound/conf.d/server-so-sndbuf.conf and gave it this content.
server: so-sndbuf: 0