Solved FreeBSD 15.0 Can't start unbound

Code:
# service unbound onestart
Obtaining a trust anchor...
Starting unbound.
[1764767306] unbound[4314:0] error: bind: address already in use
[1764767306] unbound[4314:0] fatal error: could not open ports
/usr/local/etc/rc.d/unbound: WARNING: failed to start unbound
 
rc.conf
Code:
sshd_enable="YES"
ntpd_enable="YES"
local_unbound_enable="YES"
moused_nondefault_enable="NO"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
 
Code:
~ $ netstat -na | grep LIST
tcp4           0      0 *.22                   *.*                    LISTEN    
tcp6           0      0 *.22                   *.*                    LISTEN    
tcp4           0      0 127.0.0.1.53           *.*                    LISTEN    
tcp6           0      0 ::1.53                 *.*                    LISTEN
 
Code:
# service unbound onestart
Think you're confusing dns/unbound with local_unbound that's included with the base OS. You need to service local_unbound start

Code:
# ll /etc/rc.d/local_unbound
-r-xr-xr-x  1 root wheel 2884 Jun  1  2024 /etc/rc.d/local_unbound*
Code:
tcp4 0 0 127.0.0.1.53 *.* LISTEN 
tcp6 0 0 ::1.53 *.* LISTEN
There's already something listening on port 53. Which is probably local_unbound, not unbound (which comes from dns/unbound).
 
He means the network port that unbound wants to use (I assume port 53) is already in use.

I don't have a 15 machine to look at but none of my 14 machines have an "unbound" service by default, only local_unbound.
It looks like this is a package you installed as it's in /usr/local/etc/rc.d.

You'll probably need to stop the local_unbound service and disable it before running unbound. (then put unbound_enable="yes" in rc.conf instead)
That's if you actually have a need the full unbound package instead of local_unbound in the first place...
 
Think you're confusing dns/unbound with local_unbound that's included with the base OS. You need to service local_unbound start

Code:
# ll /etc/rc.d/local_unbound
-r-xr-xr-x  1 root wheel 2884 Jun  1  2024 /etc/rc.d/local_unbound*

There's already something listening on port 53. Which is probably local_unbound, not unbound (which comes from dns/unbound).
Code:
 sudo service local_unbound start
local_unbound already running?  (pid=1816).
pal@celebris:~ $ sudo service local_unbound status
local_unbound is running as pid 1816.
 
Code:
sudo service local_unbound start
local_unbound already running? (pid=1816).
pal@celebris:~ $ sudo service local_unbound status
local_unbound is running as pid 1816.
Yes, it's enabled in rc.conf: local_unbound_enable="YES".
You probably selected that option during the installation.

If you want to use dns/unbound instead: service local_unbound stop, sysrc -x local_unbound_enable, then service unbound onestart will work.
 
Back
Top