-
-
Notifications
You must be signed in to change notification settings - Fork 231
Description
Versions
All Unbound and Pi_Hole installations using Debian 13 Trixie
Platform
Debian 13, Debian Trixie, and all OS'es that rely on Debian 13
Expected behavior
(https://docs.pi-hole.net/guides/dns/unbound/#fix-so-rcvbuf-warning-in-unbound)
Actual behavior / bug
This Fix no longer works with Debian 13. See Debian Release Notes:
5.1.15. /etc/sysctl.conf is no longer honored (https://www.debian.org/releases/trixie/release-notes/issues.html#etc-sysctl-conf-is-no-longer-honored)
In Debian 13, systemd-sysctl no longer reads /etc/sysctl.conf. The package linux-sysctl-defaults ships /usr/lib/sysctl.d/50-default.conf which is intended to replace the former /etc/sysctl.conf. This package is recommended by systemd, and will thus be installed by default on systems where installation of recommended packages has not been turned off.
Check whether linux-sysctl-defaults is installed on your system and whether the contents of /usr/lib/sysctl.d/50-default.conf conform to your expectations. Consider putting local configuration into file snippets named /etc/sysctl.d/*.conf.
Steps to reproduce
Steps to reproduce the behavior:
Install Debian 13 (I did it in a VM and an LXC container on Proxmox)
Follow guide for setting up Unbound with PiHole and these steps no longer work:
Fix so-rcvbuf warning in unbound¶
The configuration in /etc/unbound/unbound.conf.d/pi-hole.conf sets the socket receive buffer size for incoming DNS queries to a higher-than-default value in order to handle high query rates:
so-rcvbuf: 1m
As a result, you may see this warning in unbound logs:
so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root permissions(linux) or sysctl bigger net.core.rmem_max(linux) or kern.ipc.maxsockbuf(bsd) values.
To fix it:
Check the current limit. This will show something like net.core.rmem_max = 425984:
sudo sysctl net.core.rmem_max
Temporarily increase the limit to match unbound's request:
sudo sysctl -w net.core.rmem_max=1048576
Make it permanent. Edit /etc/sysctl.conf and add or edit the line:
net.core.rmem_max=1048576
Save and apply:
sudo sysctl -p
Restart unbound:
sudo service unbound restart
I've tried multiple ways to try and set the parameters creating new config files as outlined and have failed. The command "sysctl -w net.core.rmem_max=1048576" when running as root returns "sysctl: setting key "net.core.rmem_max": Operation not permitted" Further any attempt to put it into the new config located at: /usr/lib/sysctl.d/50-default.conf or creating /etc/sysctl.d/90-override.conf as specified by Debian has failed. "so-rcvbuf 8388608 was not granted. Got 425984."