OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: Meik on August 10, 2022, 03:48:02 pm

Title: [Fixed] Unbound did not start - how to debug?
Post by: Meik on August 10, 2022, 03:48:02 pm
Hello 👋

I have two OPNsense, which only hang with one interface in the network, on which the unbound service no longer starts since the 22.x.
Both installed on a Hyper-V 2012R2 and 2019 host.
Code: [Select]
Date
Severity
Process
Line
2022-08-10T14:24:33 Error configd.py [305016fc-62f2-4ec1-8c49-9f09771a06c8] Script action stderr returned "b"pgrep: Cannot open pidfile `/var/run/unbound.pid': No such file or directory""
2022-08-10T14:24:33 Notice configd.py [305016fc-62f2-4ec1-8c49-9f09771a06c8] request Unbound status
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //usr/local/etc/unbound_dhcpd.conf
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //var/unbound/root.hints
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //usr/local/etc/unbound.opnsense.d/miscellaneous.conf
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //usr/local/etc/unbound.opnsense.d/domainoverrides.conf
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //var/unbound/private_domains.conf
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //usr/local/etc/unbound.opnsense.d/dot.conf
2022-08-10T14:24:28 Debug configd.py OPNsense/Unbound/* generated //tmp/unbound-blocklists.conf
2022-08-10T14:24:28 Notice configd.py generate template container OPNsense/Unbound/core
2022-08-10T14:24:28 Notice configd.py [9290ca78-7411-4ef0-976a-28e390648445] generate template OPNsense/Unbound/*
2022-08-10T00:12:22 Notice configd.py [0b216cc1-e978-4b48-8ded-18428ea0abe2] Unbound cache flush
2022-08-09T20:45:57 Notice configd.py [c7bf4753-f82c-4712-aeba-db93fee1cc8b] Unbound cache flush
------------------------
PID
USERNAME
PRI
NICE
SIZE
RES
STATE
C
TIME
WCPU
COMMAND
14274 root 102 0 32M 19M CPU0 0 80:30 99.62% /usr/local/sbin/unbound-checkconf /var/unbound/unbound.conf
14167 root 52 0 13M 2284K wait 0 0:00 0.00% /bin/sh /usr/local/opnsense/scripts/unbound/start.sh
14121 root 52 0 13M 2144K wait 0 0:00 0.00% /usr/local/bin/flock -n -E 0 -o /tmp/unbound_start.lock /usr/local/opnsense/scripts/unbound/start.sh

The Unbound Protocol is empty (cleared, but it comes no new entry's).

Reset to Factory-Default and reconfigure interface only, Unbound did not start.

How to search, why Unbound did not start.

Thanks for help - Meik

Title: Re: Unbound did not start - how to debug?
Post by: cookiemonster on August 10, 2022, 11:20:58 pm
I'd start with "configctl unbound check" without quotes on the console.
Title: Re: Unbound did not start - how to debug?
Post by: JustMeHere on August 11, 2022, 12:19:02 am
Look at your leases file.  Is it corrupted?  It should be text.   If it is corrupted, delete it.   Mine looked like it was binary.

I can't remember where it is, but that's been my problem twice now.

It looks like they live here: /var/dhcpd/var/db

Sorry, I can't remember specifically what file I deleted, but it was obviouss when it was corrupted.
Title: Re: Unbound did not start - how to debug?
Post by: Meik on August 11, 2022, 06:40:49 pm
Hi cookiemonster:
"no errors in /var/unbound/unbound.conf"

Hi JustMeHere, DHCP-Server is not used / folder is empty:
root@fw:/var/dhcpd/var/db # ls
root@fw:/var/dhcpd/var/db #

Code: [Select]
root@fw:/var/unbound # ls
access_lists.conf       etc                     root.hints              unbound_control.pem
conf.d                  host_entries.conf       root.key                unbound_server.key
dev                     lib                     run                     unbound_server.pem
dhcpleases.conf         private_domains.conf    unbound.conf            usr
domainoverrides.conf    resolv.conf.root        unbound_control.key     var
Title: Re: Unbound did not start - how to debug?
Post by: cookiemonster on August 11, 2022, 10:16:29 pm
My guess is that Unbound not starting is only a symptom, especially if there are "hung" interfaces.
Check that is not a case of an interface with VLANs and without assigned parent interfaces, for instance as some of the latest significant changes in interfaces since the last two major releases.
Apart from that is all about hunting the dmesg and system logs for clues.
Title: [Fixed] Re: Unbound did not start - how to debug?
Post by: Meik on August 13, 2022, 09:52:08 pm
Hi cookiemonster,

great it works
- I have one unassigned Interface, Unbound can't start.
- I simple assign the Interface, not configure anything, - start Unbound - it work's

Unbound back to Business - Thank you

Regards - Meik