Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Unbound Keeps restarting

    Scheduled Pinned Locked Moved DHCP and DNS
    15 Posts 7 Posters 647 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      youcangetholdofjules
      last edited by

      I have this issue I am seeing quite often.

      Jun 28 12:39:05 kea2unbound 8303 Unbound reloaded: /var/unbound/unbound.conf
      Jun 28 12:39:05 kea2unbound 8303 Include updated: /var/unbound/leases/leases4.conf (40dba4efd3910c22)
      Jun 28 12:39:05 kea2unbound 8303 Unbound lease include is missing or inconsistent: /var/unbound/leases/leases4.conf
      Jun 28 12:36:53 kea-dhcp4 79115 WARN [kea-dhcp4.dhcp4.0x12ddce12000] DHCP4_MULTI_THREADING_INFO enabled: yes, number of threads: 4, queue size: 64
      Jun 28 12:36:53 kea-dhcp4 79115 WARN [kea-dhcp4.dhcp4.0x12ddce12000] DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
      Jun 28 12:36:53 kea-dhcp4 79115 WARN [kea-dhcp4.dhcpsrv.0x12ddce12000] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled.

      I have disabled DNS registration for DHCP clients on all my subnets, which seems to have improved things a bit but I am still getting this issue which is driving me crazy - EVERYTHING needs to re-register, and all those I have assigned static IPs to go down for some time while the system sorts itself out.

      Any ideas?

      Thanks,
      Julian

      NightlySharkN patient0P B 3 Replies Last reply Reply Quote 0
      • Y
        youcangetholdofjules
        last edited by

        oh, and leases4.conf is pretty much empty:

        40dba4efd3910c22

        Automatically generated! DO NOT EDIT!

        Last updated: 2025-06-28 12:39:05

        GertjanG 1 Reply Last reply Reply Quote 0
        • NightlySharkN
          NightlyShark @youcangetholdofjules
          last edited by

          @youcangetholdofjules Are you sure there is no misconfiguration going on? Maybe you forgot to update DHCP on an interface that changed subnets?

          1 Reply Last reply Reply Quote 0
          • patient0P
            patient0 @youcangetholdofjules
            last edited by

            @youcangetholdofjules what pfSense version are you running? And do you have a watchdog setup to restart KEA or Unbound?

            The KEA log messages are ok, not sure about the Unbound lease file. Do you have more logs?

            Btw: if you post log file content or commands and outputs, you can use Markdown syntax to make easier to read by adding a line before and after which contains only "```" (without the quotes):

            Jun 28 12:39:05 kea2unbound 8303 Unbound reloaded: /var/unbound/unbound.conf
            Jun 28 12:39:05 kea2unbound 8303 Include updated: /var/unbound/leases/leases4.conf (40dba4efd3910c22)
            Jun 28 12:39:05 kea2unbound 8303 Unbound lease include is missing or inconsistent: /var/unbound/leases/leases4.conf
            Jun 28 12:36:53 kea-dhcp4 79115 WARN [kea-dhcp4.dhcp4.0x12ddce12000] DHCP4_MULTI_THREADING_INFO enabled: yes, number of threads: 4, queue size: 64
            
            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @youcangetholdofjules
              last edited by

              @youcangetholdofjules said in Unbound Keeps restarting:

              oh, and leases4.conf is pretty much empty:

              40dba4efd3910c22
              Automatically generated! DO NOT EDIT!
              Last updated: 2025-06-28 12:39:05
              

              That's to simple. It's actually an empty file - no 'data.

              It should look like this :

              # 12e306cf4c3365ca
              # Automatically generated! DO NOT EDIT!
              # Last updated: 2025-07-01 03:46:08
              local-data: "tl-sg108e.bhf.tld. 7200 IN A 192.168.1.3"
              local-data: "3.1.168.192.in-addr.arpa. 7200 IN PTR tl-sg108e.bhf.tld."
              local-data: "9.1.168.192.in-addr.arpa. 7200 IN PTR cloudkey.bhf.tld."
              local-data: "vr-radio.bhf.tld. 7200 IN A 192.168.1.18"
              local-data: "18.1.168.192.in-addr.arpa. 7200 IN PTR vr-radio.bhf.tld."
              local-data: "iphone-xii-gertjan.bhf.tld. 28800 IN A 192.168.1.35"
              local-data: "35.1.168.192.in-addr.arpa. 28800 IN PTR iphone-xii-gertjan.bhf.tld."
              local-data: "ub6prob2.bhf.tld. 7200 IN A 192.168.1.253"
              local-data: "253.1.168.192.in-addr.arpa. 7200 IN PTR ub6prob2.bhf.tld."
              local-data: "ub6prob1.bhf.tld. 7200 IN A 192.168.1.254"
              local-data: "254.1.168.192.in-addr.arpa. 7200 IN PTR ub6prob1.bhf.tld."
              local-data: "43.1.168.192.in-addr.arpa. 7200 IN PTR iphone-12-nicojullien.bhf.tld."
              local-data: "galaxy-s8-niki.bhf.tld. 7200 IN A 192.168.1.42"
              local-data: "42.1.168.192.in-addr.arpa. 7200 IN PTR galaxy-s8-niki.bhf.tld."
              local-data: "desk5000.bhf.tld. 7200 IN A 192.168.1.41"
              local-data: "41.1.168.192.in-addr.arpa. 7200 IN PTR desk5000.bhf.tld."
              

              and now "kea2unbound " find the data and wn't complain anymore.

              Normally, the kea DHCP server regular dumps the 'in memory' leases database into this file.
              When it dumps this file, it also calls an external script : kea2unbound and this scripts will 'dialog' with unbound.
              It's a bit strange to see kea calling kea2unbound when it wrote an empty /var/unbound/leases/leases4.conf file ... as that doesn't make sense.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • B
                bimmerdriver @youcangetholdofjules
                last edited by

                @youcangetholdofjules I'm seeing exactly the same messages. Both DHCPv4 and v6 are working very poorly since I upgraded to 2.8.0.

                Y 1 Reply Last reply Reply Quote 0
                • B
                  bimmerdriver
                  last edited by

                  On my system, these files are empty:

                  /var/unbound/leases/leases4.conf
                  /var/unbound/leases/leases6.conf
                  /var/unbound/dhcpleases_entries.conf

                  There are both v4 and v6 reservations and leases.

                  1 Reply Last reply Reply Quote 0
                  • Y
                    youcangetholdofjules @bimmerdriver
                    last edited by youcangetholdofjules

                    @bimmerdriver Ok I finally managed to solve it.

                    Not quite sure whether this is the most kosher of methods, a bit outside of my usual wheelhouse, but here's what I did:

                    e11d41c8-2e26-4cee-b92f-7817d9cbd9b4-image.png

                    If you go into the DHCP Server and go onto each of your interfaces, change "DNS Registration" and "DNS Early Registration" from "track server" to "Disable"

                    Then go into the DHCP Server settings page:

                    d676497b-4dfd-4e39-83f7-e94f784ab56a-image.png

                    And enable both there.

                    Not sure why but that seems to work. the leases4.conf is now fully populated and I haven't had a single DHCP Server restart since.

                    I would like the thoughts of an expert on this however - that was just me manhandling it until it worked,

                    Cheers,

                    Julian

                    B 1 Reply Last reply Reply Quote 1
                    • B bimmerdriver referenced this topic
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      I'd expect that to disable DNS registration for clients on that interface. You might be seeing existing registration still present only.

                      Y 1 Reply Last reply Reply Quote 0
                      • B
                        bimmerdriver @youcangetholdofjules
                        last edited by

                        @youcangetholdofjules Thank you very much for your reply. I managed to get the system stable again by following your suggestion.

                        The first time I tried it, only the DHCPv4 file got populated, so I tried again. The second time, I completely disabled all of the DHCPv4 and DHCPv6 settings. Then I rebooted the system and re-enabled them. After that, both files were populated.

                        Now, the GUI is stable and it seems that I can make changes to the reservations.

                        Y 1 Reply Last reply Reply Quote 0
                        • Y
                          youcangetholdofjules @bimmerdriver
                          last edited by

                          @bimmerdriver that's great. Thanks for the response, and glad I could help.

                          I just wish I was a bit clearer on the science behind it.

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            bimmerdriver @youcangetholdofjules
                            last edited by

                            @youcangetholdofjules said in Unbound Keeps restarting:

                            @bimmerdriver that's great. Thanks for the response, and glad I could help.

                            I just wish I was a bit clearer on the science behind it.

                            I'm glad it's fixed, I would especially like to know what caused it to break. My network is small. I would not want to experience this for a large network.

                            E 1 Reply Last reply Reply Quote 0
                            • E
                              eldest @bimmerdriver
                              last edited by eldest

                              I too am seeing this exact issue across two fresh installs of 2.8.0 on different hardware. I think this is the root of a few issues that have been reported including this one:

                              https://forum.netgate.com/topic/197613/pfsense-ce-2-8-0-kea2unbound-causes-high-cpu-load-even-when-dns-registration-is-disabled/2?_=1749683895535

                              Is this not a clear bug if kea2unbound is being invoked when dns registration and early dns registration are deselected? or is this intended to always restart unbound at random? I'm seeing the same logs and same symptoms with /var/unbound/leases/leases4.conf empty. Happy to provide any information needed as this is very disruptive.

                              1 Reply Last reply Reply Quote 0
                              • Y
                                youcangetholdofjules @stephenw10
                                last edited by

                                @stephenw10 If I understand you correctly, as the leases expire and renew, maybe I face the same pickle again - its not without its wobbles, but the system has been running much more stably since this change.

                                There are tasmota devices I have on my IOT subnet that I obviously have locked right down, and they still throw up a few problems but thats maybe my overzealousness on security policy. Everything else now works well.

                                1 Reply Last reply Reply Quote 1
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Hmm, yeah I'd expect it to only be resolving leases that were present before that change. Like if you add a new static dhcp lease on that interface I'd expect that to fail to resolve.

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.