MartineauUK / Unbound-Asuswrt-Merlin

Install and manage unbound (Recursive DNS) on Asus routers
Apache License 2.0
66 stars 13 forks source link

Unbound suddenly stopped working #11

Closed doublefx closed 4 years ago

doublefx commented 4 years ago

Hi,

Unbound suddenly stopped working on my AC-3200 with this message, same after uninstall / re-installed it, any clue?


[1589026156] unbound-checkconf[21098:0] fatal error: control-key-file: "(null)" does not exist

***ERROR INVALID unbound configuration - use option 'vx' to correct 'unbound.conf' or 'rl' to load a valid configuration file

                                         or 'e' exit; then issue debug command

                                                unbound -dv```

Firmaware: 384.13_8

After uninstall:

amtm 3.1.7 FW             by thelonelycoder
 RT-AC3200 (armv7l) FW-384.13 @ 192.168.1.1
    The Asuswrt-Merlin Terminal Menu

 1  open     Diversion                v4.1.12
 2  open     Skynet                    v7.1.6
 3  open     FreshJR QOS                 v8.8

 4  open     YazFi                     v4.0.3
 5  open     scribe                    v2.4.2
 6  open     x3mRouting                v1.0.5

 j1 open     connmon                   v2.5.0
 j3 open     scMerlin                  v1.1.1

 j4 open     spdMerlin                 v3.5.2
 j5 open     uiDivStats                v1.3.2
 j6 open     uiScribe                  v1.3.1

 ep manage   Entware packages

 dc manage   Disk check script   dcl show log
 rs manage   Reboot scheduler Mon @ 3:00
 sw manage   Swap file /mnt/entware 2.0G

 i  show     all available scripts or tools
 u  check    for script updates
MartineauUK commented 4 years ago

AFAIK there have only been two instances reported, and only one bothered to reply

https://www.snbforums.com/threads/release-unbound_manager-manager-installer-utility-for-unbound-recursive-dns-server.61669/page-96#post-578915" and his 'solution' https://www.snbforums.com/threads/release-unbound_manager-manager-installer-utility-for-unbound-recursive-dns-server.61669/page-96#post-579285"

I have never been supplied with the 'broken' 'unbound.conf' file so I am unable to try any testing to see what the root cause is.

doublefx commented 4 years ago

If the fix is to reset my router, I will not do it, I do not want to loose my current config.

Here is the file: https://pastebin.com/87NPL3yq

drwxr-xr-x    3 doublefx root          4096 May  9 17:15 ..
drwxrwxrwx    2 doublefx root          4096 May  9 17:18 adblock
-rw-rw-rw-    1 doublefx root          3313 May  9 17:19 root.hints
-rw-rw-rw-    1 doublefx root           758 May  9 17:19 root.key
-rw-rw-rw-    1 doublefx root          9072 May  9 17:19 unbound.conf
-rw-r-----    1 doublefx root          2455 May  9 17:18 unbound_control.key
-rw-r-----    1 doublefx root          1330 May  9 17:18 unbound_control.pem
-rw-r-----    1 doublefx root          2459 May  9 17:18 unbound_server.key
-rw-r-----    1 doublefx root          1318 May  9 17:18 unbound_server.pem
doublefx commented 4 years ago

Also, not sure whether it is of interest but I noticed the 'Segmentation fault':

E:Option ==> ?

        Version=3.11
        Local                                           md5=6819dc92f908c0604f910eb11913f2d5
        Github                                          md5=6819dc92f908c0604f910eb11913f2d5
        /jffs/addons/unbound/unbound_manager.md5        md5=6819dc92f908c0604f910eb11913f2d5

        Router Configuration recommended pre-reqs status:

        [✔] Swapfile=2097148 kB
        [✔] DNS Filter=ON
        [✔] DNS Filter=ROUTER
        [✔] WAN: Use local caching DNS server as system resolver=NO
        [✔] Enable local NTP server=YES
        [✔] Enable DNS Rebind protection=NO
        [✔] Enable DNSSEC support=NO

        Options:

        [✔] unbound Logging
        [✔] unbound-control FAST response ENABLED

        unbound Memory/Cache:

Segmentation fault
        'key-cache-size:'        (N/A)
Segmentation fault
Segmentation fault
        'msg-cache-size:'        (N/A)  0% used         (N/A)
Segmentation fault
Segmentation fault
        'rrset-cache-size:'      (N/A)  0% used         (N/A)

        System Memory/Cache:

                     total       used       free     shared    buffers     cached
        Mem:        255436     179352      76084          0       4288      29132
        -/+ buffers/cache:     145932     109504
        Swap:      2097148       6940    2090208

        About unbound: https://nlnetlabs.nl/projects/unbound/about/

        SNB Forums unbound support: https://www.snbforums.com/threads/unbound-authoritative-recursive-caching-dns-server.58967/

Bad address
[1589044871] unbound-checkconf[14822:0] fatal error: control-key-file: "(null)" does not exist

***ERROR INVALID unbound configuration - use option 'vx' to correct 'unbound.conf' or 'rl' to load a valid configuration file

                                         or 'e' exit; then issue debug command

                                                unbound -dv
MartineauUK commented 4 years ago

Thank you for the 'unbound.conf'. I have successfully loaded it and unbound has found no issues with using it.

Given your reference to the 'Segmentation Fault', I suggest you read the following post, particularly the Entware related issue. https://www.snbforums.com/threads/release-unbound_manager-manager-installer-utility-for-unbound-recursive-dns-server.61669/page-86#post-576093

doublefx commented 4 years ago

Fixed:

rm /opt/etc/init.d/S61unbound rm -r /opt/var/lib/unbound rm -r /jffs/addons/unbound opkg remove --force-depends libunbound amtm: r (reset option) amtm: 7 (install unbound)

E:Option ==> ?

        Version=3.11
        Local                                           md5=5c965a9dc7662e3644d9d3d3d01886eb
        Github                                          md5=5c965a9dc7662e3644d9d3d3d01886eb
        /jffs/addons/unbound/unbound_manager.md5        md5=5c965a9dc7662e3644d9d3d3d01886eb

        Router Configuration recommended pre-reqs status:

        [✔] Swapfile=2097148 kB
        [✔] DNS Filter=ON
        [✔] DNS Filter=ROUTER
        [✔] WAN: Use local caching DNS server as system resolver=NO
        [✔] Enable local NTP server=YES
        [✔] Enable DNS Rebind protection=NO
        [✔] Enable DNSSEC support=NO

        Options:

        [✔] unbound Logging
        [✔] unbound CPU/Memory Performance tweaks
        [✔] Router Graphical GUI statistics TAB installed
        [✔] unbound-control FAST response ENABLED

        unbound Memory/Cache:

        'key-cache-size:'       8388608 (8.00 MB)
        'msg-cache-size:'       8388608 (8.00 MB)       0% used 57171   (55.83 KB)
        'rrset-cache-size:'     16777216 (16.00 MB)     1% used 216305  (211.24 KB)

        System Memory/Cache:

                     total       used       free     shared    buffers     cached
        Mem:        255436     178812      76624          0       2284      26672
        -/+ buffers/cache:     149856     105580
        Swap:      2097148         28    2097120

        About unbound: https://nlnetlabs.nl/projects/unbound/about/

        SNB Forums unbound support: https://www.snbforums.com/threads/unbound-authoritative-recursive-caching-dns-server.58967/

unbound (pid 22777) is running... uptime: 0 Days, 00:08:12 version: 1.10.0 # rgnldo Github Version=v1.10 Martineau update (Date Loaded by unbound_manager Sat May 9 22:56:59 DST 2020)

Thanks !