Two different unbound instances running, causes problems at each reboot

Started by neek, October 11, 2025, 04:25:42 PM

Previous topic - Next topic
Somehow, I think when I upgraded to 25.7, my opnsense server started runing a second unbound instance. Each time I reboot the system, it causes some issues where I have to manually kill one. I see that I've got the following running:
root@opnsense:~ # ps ax | grep unbound
47667  -  Is    0:00.03 /usr/local/sbin/unbound -c /usr/local/etc/unbound/unbound.conf
59585  -  Ss    0:03.94 /usr/local/bin/python3 /usr/local/opnsense/scripts/dhcp/unbound_watcher.py --domain [my.domain.tld] (python3.11)
93490  -  Is    0:00.28 /usr/local/sbin/unbound -c /var/unbound/unbound.conf
It looks like the one that uses /var/unbound/unbound.conf is the correct config. The one using /usr/local/etc/unbound/unbound.conf should not be running.

I've grepped around trying to find why that second instance is loaded, but I don't see anything. Can anyone point me in the right direction? It also seems that my AdGuardHome doesn't run at boot anymore, but I'm guessing that's because this second instance of unbound consumes ports which I configure AdGuard to use, so AdGuard can't run until I kill the one unbound.

Thanks in advance!

Did you set up Unbound using /etc/rc.conf or /etc/rc.d/unbound ?

We don't use that and you shouldn't. Delete the Unbound-specific files or remove the respective lines from rc.conf.


Cheers,
Franco

I did have a file in /etc/rc.conf.d/unbound with only the contents unbound_enable="yes".

I removed that, and it fixed this issue, thanks.

Maybe related: I also no longer have adguardhome starting at boot time. When I run it manually after a restart, it does launch. What method does opnsense use to decide which services to launch at boot? I'd like to make sure adguardhome is included in that.