OPNsense Forum

English Forums => 25.7 Series => Topic started by: neek on October 11, 2025, 04:25:42 PM

Title: Two different unbound instances running, causes problems at each reboot
Post by: neek on October 11, 2025, 04:25:42 PM
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!
Title: Re: Two different unbound instances running, causes problems at each reboot
Post by: franco on October 13, 2025, 08:41:20 AM
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
Title: Re: Two different unbound instances running, causes problems at each reboot
Post by: neek on October 15, 2025, 05:43:23 AM
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.
Title: Re: Two different unbound instances running, causes problems at each reboot
Post by: franco on October 15, 2025, 08:34:52 AM
May be related to defunct DNS resolution at boot. Can't really comment on AGH. RC-based services are started according to normal FreeBSD logic.


Cheers,
Franco