# Unbound will not start

**URL:** <https://discourse.pi-hole.net/t/unbound-will-not-start/37533>\
**Category:** Community Help\
**Created:** [August 22, 2020, 1:29pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533 "2020-08-22T13:29:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 1:29pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/1 "2020-08-22T13:29:43Z")

</div>

I have installed Unbound by following the official guide but every time I try to start it I get this result

```auto
pi@raspberrypi:~ $ systemctl status unbound
● unbound.service - Unbound DNS server
   Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-08-22 07:59:46 CDT; 7s ago
     Docs: man:unbound(8)
  Process: 6731 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=1/FAILURE)
  Process: 6734 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=1/FAILURE)
  Process: 6737 ExecStart=/usr/sbin/unbound -d $DAEMON_OPTS (code=exited, status=1/FAILURE)
 Main PID: 6737 (code=exited, status=1/FAILURE)

Aug 22 07:59:46 raspberrypi systemd[1]: unbound.service: Service RestartSec=100ms expired, scheduling restart.
Aug 22 07:59:46 raspberrypi systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Aug 22 07:59:46 raspberrypi systemd[1]: Stopped Unbound DNS server.
Aug 22 07:59:46 raspberrypi systemd[1]: unbound.service: Start request repeated too quickly.
Aug 22 07:59:46 raspberrypi systemd[1]: unbound.service: Failed with result 'exit-code'.
Aug 22 07:59:46 raspberrypi systemd[1]: Failed to start Unbound DNS server.

```

I have uninstalled and reinstalled unbound but I cannot seem to get it to work. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 22, 2020, 1:48pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/2 "2020-08-22T13:48:56Z")

</div>

Please post the complete output of this command from the Pi terminal - you can format the text as "pre-formatted text" using the _ **\</\>** _ icon in the reply window.

`sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*`

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 2:09pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/3 "2020-08-22T14:09:00Z")

</div>

```auto
/etc/unbound/unbound.conf.d/pi-hole.conf:server:
/etc/unbound/unbound.conf.d/pi-hole.conf: verbosity: 0
/etc/unbound/unbound.conf.d/pi-hole.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pi-hole.conf: port: 5335
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip4: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-udp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-tcp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip6: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: prefer-ip6: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: root-hints: "/var/lib/unbound/root.hints"
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-glue: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: use-caps-for-id: no
/etc/unbound/unbound.conf.d/pi-hole.conf: edns-buffer-size: 1472
/etc/unbound/unbound.conf.d/pi-hole.conf: prefetch: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: num-threads: 1
/etc/unbound/unbound.conf.d/pi-hole.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fd00::/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fe80::/10

```

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 22, 2020, 2:25pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/4 "2020-08-22T14:25:58Z")

</div>

Looks like you are missing some configuration files. From a working unbound install, these additional lines appear in that output:

```auto
sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf:include: "/etc/unbound/unbound.conf.d/*.conf"
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf: auto-trust-anchor-file: "/var/lib/unbound/root.key"
....

```

This configuration file contains the pointer to use the new configuration file you installed per the Pi-hole guid:

```auto
cat /etc/unbound/unbound.conf

# Unbound configuration file for Debian.
#
# See the unbound.conf(5) man page.
#
# See /usr/share/doc/unbound/examples/unbound.conf for a commented
# reference config file.
#
# The following line includes additional configuration files from the
# /etc/unbound/unbound.conf.d directory.
include: "/etc/unbound/unbound.conf.d/*.conf"

```

This file defines where your anchor file is located:

```auto
cat /etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf
server:
    # The following line will configure unbound to perform cryptographic
    # DNSSEC validation using the root trust anchor.
    auto-trust-anchor-file: "/var/lib/unbound/root.key"

```

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 2:39pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/5 "2020-08-22T14:39:17Z")

</div>

```auto
pi@raspberrypi:~ $ sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:cat /etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf: auto-trust-anchor-file: "/var/lib/unbound/root.key"
/etc/unbound/unbound.conf.d/pi-hole.conf:server:
/etc/unbound/unbound.conf.d/pi-hole.conf: verbosity: 0
/etc/unbound/unbound.conf.d/pi-hole.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pi-hole.conf: port: 5335
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip4: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-udp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-tcp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip6: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: prefer-ip6: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: root-hints: "/var/lib/unbound/root.hints"
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-glue: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: use-caps-for-id: no
/etc/unbound/unbound.conf.d/pi-hole.conf: edns-buffer-size: 1472
/etc/unbound/unbound.conf.d/pi-hole.conf: prefetch: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: num-threads: 1
/etc/unbound/unbound.conf.d/pi-hole.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fd00::/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fe80::/10

```

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 22, 2020, 5:03pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/6 "2020-08-22T17:03:44Z")

</div>

> [@jfb](#):
>
> `/etc/unbound/unbound.conf`

Looks like you are still missing this file.

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 7:28pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/7 "2020-08-22T19:28:26Z")

</div>

> [@jfb](#):
>
> sudo grep -v '#|^$' -R /etc/unbound/unbound.conf\*

```auto
/etc/unbound/unbound.conf:server:
/etc/unbound/unbound.conf: verbosity: 0
/etc/unbound/unbound.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf: port: 5335
/etc/unbound/unbound.conf: do-ip4: yes
/etc/unbound/unbound.conf: do-udp: yes
/etc/unbound/unbound.conf: do-tcp: yes
/etc/unbound/unbound.conf: do-ip6: no
/etc/unbound/unbound.conf: prefer-ip6: no
/etc/unbound/unbound.conf: root-hints: "/var/lib/unbound/root.hints"
/etc/unbound/unbound.conf: harden-glue: yes
/etc/unbound/unbound.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf: use-caps-for-id: no
/etc/unbound/unbound.conf: edns-buffer-size: 1472
/etc/unbound/unbound.conf: prefetch: yes
/etc/unbound/unbound.conf: num-threads: 1
/etc/unbound/unbound.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf: private-address: fd00::/8
/etc/unbound/unbound.conf: private-address: fe80::/10
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf: auto-trust-anchor-file: "/var/lib/unbound/root.key"

```

I don't know what I'm missing. I added the unbound.conf file

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 7:31pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/8 "2020-08-22T19:31:04Z")

</div>

> [@jfb](#):
>
> `/etc/unbound/unbound.conf.d/*.conf`

okay so I got it running now but when I do the test I only get no error for both

```auto
dig sigfail.verteiltesysteme.net @127.0.0.1 -p 5335
dig sigok.verteiltesysteme.net @127.0.0.1 -p 5335

```

I do not get servfail

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 7:48pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/10 "2020-08-22T19:48:42Z")

</div>

deleted because I posted my IP

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 22, 2020, 7:57pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/11 "2020-08-22T19:57:02Z")

</div>

> [@mr.smokes](#):
>
> I added the unbound.conf file

You have the incorrect contents in that file - you have duplicated your pi-hole.conf file.

In _ **/etc/unbound/unbound.conf** _ , the only active (uncommented line) should be:

`include: "/etc/unbound/unbound.conf.d/*.conf"`

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 22, 2020, 7:58pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/12 "2020-08-22T19:58:57Z")

</div>

Run this command to check unbound configuration:

`unbound-checkconf`

---

<div class="post-metadata">

**Author:** ![mr.smokes](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@mr.smokes](https://discourse.pi-hole.net/u/mr.smokes)\
**Post date:** [August 22, 2020, 8:16pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/13 "2020-08-22T20:16:20Z")

</div>

success now. No errors in the unbound.conf file and I have the proper SERVFAIL and NOERROR according to the guide.

Thank you so much for your help and patience.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [September 12, 2020, 8:16pm UTC](https://discourse.pi-hole.net/t/unbound-will-not-start/37533/14 "2020-09-12T20:16:25Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
