Unbound service won't start

Hi to all

I noticed the unbound service is stopped in the service section. I tried to start it, but it failed.

I understand that this service is used as DNS server for the spam filter, as shows here:

http://docs.nethserver.org/projects/nethserver-devel/en/stable/unbound.html

I checked the logs and this what I see in /var/log/messages when I try to start the service:

Sep 21 11:18:34 gate control-service: unbound start
Sep 21 11:18:34 gate systemd: Starting Unbound recursive Domain Name Server...
Sep 21 11:18:34 gate unbound-checkconf: [1506014314] unbound-checkconf[2825:0] error: failed to read /var/lib/unbound/root.key
Sep 21 11:18:34 gate unbound-checkconf: [1506014314] unbound-checkconf[2825:0] error: error reading auto-trust-anchor-file: /var/lib/unbound/root.key
Sep 21 11:18:34 gate unbound-checkconf: [1506014314] unbound-checkconf[2825:0] error: validator: error in trustanchors config
Sep 21 11:18:34 gate unbound-checkconf: [1506014314] unbound-checkconf[2825:0] error: validator: could not apply configuration settings.
Sep 21 11:18:34 gate unbound-checkconf: [1506014314] unbound-checkconf[2825:0] fatal error: bad config for validator module
Sep 21 11:18:34 gate systemd: unbound.service: control process exited, code=exited status=1
Sep 21 11:18:34 gate systemd: Failed to start Unbound recursive Domain Name Server.
Sep 21 11:18:34 gate systemd: Unit unbound.service entered failed state.
Sep 21 11:18:34 gate systemd: unbound.service failed.
Sep 21 11:18:34 gate dbus[686]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 21 11:18:34 gate dbus-daemon: dbus[686]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Sep 21 11:18:34 gate systemd: Starting Time & Date Service...
Sep 21 11:18:34 gate dbus[686]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 21 11:18:34 gate dbus-daemon: dbus[686]: [system] Successfully activated service 'org.freedesktop.timedate1'
Sep 21 11:18:34 gate systemd: Started Time & Date Service

I don’t have visible problems with the email, but I do see some SPAM that should not go to inbox.

Is there something wrong?

Can you try the following?

cat /var/lib/unbound/root.key
# (or a copy of the file); keep it to yourself, no need to share it right now

and posting the output of:

ll /var/lib/unbound/
unbound-anchor -v
systemctl start unbound
2 Likes

That file looked empty:

[root@gate ~]# ll /var/lib/unbound/root.key
-rw-r--r-- 1 root root 0 Sep  7 05:23 /var/lib/unbound/root.key


[root@gate ~]# ll /var/lib/unbound/
total 0
-rw-r--r-- 1 root root 0 Sep  7 05:23 root.key

[root@gate ~]# unbound-anchor -v
/var/lib/unbound/root.key is empty
success: the anchor is ok

[root@gate ~]# systemctl start unbound

After those two last commands unbound seems to be started and working I think. And the file root.key is not empty any more.

Should I assume this is fixed?

Thank you.

Yes, I believe so. You can run signal-event nethserver-unbound-update and check whether unbound keeps running after. Keep an eye on it over the next days and report back if the issue reoccurs.

1 Like

Thank you. I will be monitoring this.

5 posts were split to a new topic: Unbound service problem: service doesn’t start