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

    ISC to Kea DHCP, today a crash, coincidence?

    Scheduled Pinned Locked Moved DHCP and DNS
    3 Posts 2 Posters 183 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.
    • C
      chrisjx
      last edited by

      I see some other posts about the switch to KEA but after switching yesterday, my netgate 3100 crashed 3 times this morning. It might be unrelated (it looks more like a dyndns issue) but that's all I changed so thought I'd post the particulars and see if anyone might know about what might be happening.

      Also, this coincides with a planned maintenance window of 3 hours from my fiber provider starting at 2 am. The expected 15 minute outage was still happening at 9am. By rights my pfsense should have just switch to my secondary provider as it has done many times before.

      I have a combination of dynamic dns, haproxy, and gateway groups to make available some web servers from my home lab. I have a gateway group, fail_me, that bounces from my fiber connection to my cable connection if fiber goes down. I'm using haproxy to manage the incoming dynamic dns from digital ocean and let's encrypt is conveniently terminated there as well.

      It's a recurring PHP fatal error in the dyndns.class file. The error occurs during dynamic DNS updates. Here are the details:

      pfSense Version: 14.0-CURRENT
      Architecture: armv7
      Build: FreeBSD 14.0-CURRENT armv7 1400094 #1 plus-RELENG_23_09_1-n256200-3de1e293f3a
      Build Date: Wed Dec 6 20:55:45 UTC 2023
      
      [28-Jun-2024 03:10:42 America/Los_Angeles] PHP Fatal error:  Uncaught Error: Attempt to assign property "domain_records" on null in /etc/inc/dyndns.class:1504
      Stack trace:
      #0 /etc/inc/dyndns.class(491): updatedns->_update()
      #1 /etc/inc/services.inc(3923): updatedns->__construct('digitalocean', 'music', 'example.net', 'user@example.com', 'password_hash', false, false, '', 'fail_me', NULL, NULL, NULL, '', NULL, '', '30', '', 'fail_me', '', '7', false, false, false, NULL)
      #2 /etc/inc/services.inc(3998): services_dyndns_configure_client(Array)
      #3 /etc/rc.dyndns.update(40): services_dyndns_configure()
      #4 {main}
        thrown in /etc/inc/dyndns.class on line 1504
      

      Thanks for any tips.

      C 1 Reply Last reply Reply Quote 0
      • C
        chrisjx @chrisjx
        last edited by

        Ack! - I see I posted the same problem on a a fairly long thread. Silly me. Sorry.

        See post: 23.05 - Uncaught Error: Attempt to assign property "domain_records"

        I guess an update overwrote the file.

        The problem lies in the file:
        /etc/inc/dyndns.class

        And is in a case statement:
        case 'digitalocean-v6':

        The basic idea is that the json_decode(curl might return a boolean value so that needs to be handled.

        Find this code:

        $output = json_decode(curl_exec($ch));
        if (!is_array($output->domain_records)) {
            $output->domain_records = array();
        }
        

        Replace with:

        $response = curl_exec($ch);
        if ($response === false) {
            error_log('cURL error: ' . curl_error($ch));
            $output = new stdClass();
            $output->domain_records = array();
        } else {
            $output = json_decode($response);
            if (!is_array($output->domain_records)) {
                $output->domain_records = array();
            }
        }
        

        Anyone have any tips on how to get this into distribution? I'd hate to have to apply my patch every time I get an update. But maybe I'll remember next time.

        S 1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @chrisjx
          last edited by

          @chrisjx bug reports can be made at Redmine.pfSense.org.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

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