# Unbound won't start



## N74JRW (Dec 20, 2020)

Hi,

I'm trying to get unbound up and running via the directions at: https://calomel.org/unbound_dns.html (example 1). The service refuses to start, giving the following error messages.


```
Starting local_unbound.
Waiting for nameserver to start...[1603701534] unbound-control[1155:0] warning: control-enable is 'no' in the config file.
[1603701534] unbound-control[1155:0] error: connect: Connection refused for 127.0.0.1 port 8953
.[1603701535] unbound-control[1158:0] warning: control-enable is 'no' in the config file.
[1603701535] unbound-control[1158:0] error: connect: Connection refused for 127.0.0.1 port 8953
.[1603701536] unbound-control[1161:0] warning: control-enable is 'no' in the config file.
[1603701536] unbound-control[1161:0] error: connect: Connection refused for 127.0.0.1 port 8953
.[1603701537] unbound-control[1164:0] warning: control-enable is 'no' in the config file.
[1603701537] unbound-control[1164:0] error: connect: Connection refused for 127.0.0.1 port 8953
.[1603701538] unbound-control[1167:0] warning: control-enable is 'no' in the config file.
[1603701538] unbound-control[1167:0] error: connect: Connection refused for 127.0.0.1 port 8953
 giving up
```

I haven't changed the unbound.conf file from the example. Unbound seems to be installed in two locations: /var/unbound, and /usr/local/etc/unbound. Both unbound.conf files are identical in each location. Permissions match defaults for generated files. 

/etc/resolv.conf

```
# Generated by resolvconf
domain lan.example.com
# nameserver 192.168.1.11
# nameserver 192.168.1.28

nameserver 127.0.0.1
options edns0
```

/etc/rc.conf

```
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
growfs_enable="YES"
saver="daemon"
defaultrouter="192.168.1.1"
dumpdev="AUTO"
local_unbound_enable="YES"
```

1.11 (Windows AD DC) and 1.28 (Pi-hole) are local machines which can provide forwarding/recursive DNS service. They work for any configured client. What am I doing wrong?

Thanks


----------



## SirDice (Dec 20, 2020)

N74JRW said:


> Unbound seems to be installed in two locations: /var/unbound, and /usr/local/etc/unbound.


There are two versions, one is typically named local_unbound and is part of the base OS. The other is dns/unbound. Did you configure the right one? It's easy to mix these two up. /var/unbound/ is for local-unbound(8), /usr/local/etc/unbound is for dns/unbound.


----------



## N74JRW (Dec 20, 2020)

I've been working /var/unbound. My date/time was off by two months. I fixed that manually as ntp wouldn't load because unbound isn't working. Still working on it. Thanks!


----------



## SirDice (Dec 20, 2020)

N74JRW said:


> I've been working /var/unbound.


Ok, that's fine. Then remove dns/unbound and /usr/local/etc/unbound if you have it installed. It will only add to the confusion.


----------



## putney (Dec 21, 2020)

I think local-unbound *requires* unbound-control to be enabled in unbound.conf, while 'pkg unbound' does not, from the look of the rc script:
`# grep -i \\-control /etc/rc.d/local_unbound
 until "${command}-control" status | grep -q "is running" ; do`
So your "warning: control-enable is 'no' in the config file." looks pertinent. 
hth


----------

