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

    Error after package update

    Scheduled Pinned Locked Moved pfBlockerNG
    24 Posts 5 Posters 1.8k 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.
    • GertjanG
      Gertjan @JHplusUser
      last edited by Gertjan

      @JHplusUser said in Error after package update:

      Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693

      [24.11-RELEASE][root@pfSense.bhf.tld]/etc: grep -R 'function config_read_file' *
      inc/config.lib.inc:function config_read_file(bool $use_backup = false, bool $use_cache = false) {
      

      This function is pretty 'core' as pfSense can't start without it. It's this function that read the "config.xml" that contains ALL the pfSense configuration.

      Yet your /usr/local/pkg/pfblockerng/pfblockerng.inc at line 693 wants to call it, and can't find it.
      Oh yeah ?
      Go look at very first line of the same file, /usr/local/pkg/pfblockerng/pfblockerng.inc, right after the comment section, line 23 !

      719942e4-391c-4139-aa85-51edc2e2a9a0-image.png

      so /etc/inc/config.lib.inc is included there. That files contains the function that it can't find !!
      Check this ( close to line 2361 ).

      For me, this error doesn't make sense.
      I'm short of other suggestions, except one sledgehammer solution :
      Backup your config.xml.
      Re install pfSense from scratch.
      That will take care of it for sure.

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

      J 2 Replies Last reply Reply Quote 0
      • J
        JHplusUser @Gertjan
        last edited by

        @Gertjan currently, after de-install i cant find /etc/inc/config.lib.inc;

        I was hoping to prevent a full re-install

        Would reinstalling a older backup help? I have one een configuration XML for feb 2024... What will reinstalling that do with all the packages en the pfsense version?
        After that what would be the best way to preceed in updating?

        Can I just update the pfsense core first to the newest version or would you recommend 24.03 and then the packages?
        Thats what I did an how I get in this mess ... what did I do wrong?
        What would be the best approach?

        Thanks!

        S GertjanG 2 Replies Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @JHplusUser
          last edited by

          @JHplusUser Restoring a backup just uploads the .xml file so no it will not help.

          Possibly you might be encountering disk problems or file system corruption.
          https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html

          If you can't easily recover files I would just reinstall and then restore because other files may be missing or damaged.
          https://docs.netgate.com/pfsense/en/latest/backup/restore-during-install.html

          @JHplusUser said in Error after package update:

          Can I just update the pfsense core first to the newest version or would you recommend 24.03 and then the packages

          What version of pfSense do you have?

          Always, ALWAYS install packages only for the version you have. If you are not on the current version ensure the correct version is selected for your update branch in System/Update. Otherwise if you install packages for a later version it may install dependencies such as a later PHP version, and that may break pfSense.

          Recent versions are supposed to handle this by forcing the admin to select the new version in order to upgrade.

          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!

          J 1 Reply Last reply Reply Quote 0
          • J
            JHplusUser @SteveITS
            last edited by

            @SteveITS said in Error after package update:

            What version of pfSense do you have?

            currently I run 24.11
            problems arose when I first updated tot 24.11 and then updated all the packages as well.

            thanks for your advice

            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @JHplusUser
              last edited by Gertjan

              @JHplusUser said in Error after package update:

              currently, after de-install i cant find /etc/inc/config.lib.inc;

              ? 😒
              /etc/inc/config.lib.inc isn't a "pfBlockerng" file.
              It'a a core pfSense file, as every other file in /etc/inc/
              Without it, pfSense won't start. You'll see massive errors on the pfSense console access - the GUI wouldn't be able to start. Etc.

              @JHplusUser said in Error after package update:

              What will reinstalling that do with all the packages en the pfsense version?

              That's a non question.
              Get a clean 24.11 from TAC.
              Install it.

              Now, if you have 5 second : do nothing .... but one thing : intstall pfBlockerng.
              It works - right ?
              Then, let the magic happen : import your config.xml.
              Your packages will get installed, set up.
              One extra reboot afterwards (maybe not needed) and done.

              @JHplusUser said in Error after package update:

              I was hoping to prevent a full re-install

              1. Check that the pfSense device is powered down.
              2. Insert the USB drive with the pfSense 24.11 firm ware.
              3. Connect the "most important interface ... nope, non an a RJ45 .... the console cable ! The one you got with your device.
              4. Connect with your favorite 'telnet' client (Putty will do just fine, and select the right COM port - The pfSense doc tells you all about how to use the console access)
              5. Power up your pfSense.
              6. Flow what happens on the screen.
                ....
                When the install is done, and you are asked to remove the USB drive, remove the drive.
                The device will reboot.
                pfSense will boot.

              Again : the full official steps are documented in the official Netgate Documentation support site.

              You should do it anyways one, so you know what to do when there is a plain catastrophe situation, as these are never the good moment to "learn "' stuff.

              @JHplusUser said in Error after package update:

              would you recommend 24.03 and then the packages?

              You can't get 24.03 anymore.
              24.11 is what everybody is using these days.

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

              J 2 Replies Last reply Reply Quote 0
              • J
                JHplusUser @Gertjan
                last edited by

                @Gertjan said in Error after package update:

                /etc/inc/config.lib.inc isn't a "pfBlockerng" file.
                It'a a core pfSense file, as every other file in /etc/inc/
                Without it, pfSense won't start. You'll see massive errors on the pfSense console access - the GUI wouldn't be able to start. Etc

                I have no such problems; without pfblockerng installed pfsense seems to work fine
                problems arrise when i instal pflockerng dev or previous.

                currently i do find the file config.lib.inc... i would swear I previously couldn't .... but as you said that would have been strange

                1 Reply Last reply Reply Quote 0
                • J
                  JHplusUser @Gertjan
                  last edited by JHplusUser

                  @Gertjan said in Error after package update:

                  [24.11-RELEASE][root@pfSense.bhf.tld]/etc: grep -R 'function config_read_file' *
                  inc/config.lib.inc:function config_read_file(bool $use_backup = false, bool $use_cache = false) {

                  I was able to locate the file config.lib.inc and it seems the function config_read_file is indeed missing somehow?\

                  On the other hand it seems in most of the errors that is calling the function with the same name from /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                  e.g. PHP {$errortype}s
                  PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 693, Message: Uncaught Error: Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc:693
                  Stack trace:
                  #0 /usr/local/pkg/pfblockerng/pfblockerng.inc(826): pfb_global()
                  #1 /etc/inc/pkg-utils.inc(1088): require_once('/usr/local/pkg/...')
                  #2 /etc/rc.packages(80): delete_package_xml()
                  #3 {main}

                  Please also note that I have no problem what soever with pfsense without pfblockerng installed.

                  If no real solution exist I will start preparing myself for a reinstall...

                  S GertjanG 2 Replies Last reply Reply Quote 0
                  • S
                    SteveITS Galactic Empire @JHplusUser
                    last edited by

                    @JHplusUser said in Error after package update:

                    Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng

                    these may help:
                    https://redmine.pfsense.org/issues/15933
                    https://forum.netgate.com/topic/195242/pfblockerng-3-2-0_16-causes-gui-crash-with-24-03/

                    Can you double check your update branch is set to 24.11 if that's your pfSense version?

                    "undefined function" may mean the PHP file containing that function isn't loading fully due to an error condition above that point. We were going with your comment that the file didn't exist on disk.

                    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!

                    J 2 Replies Last reply Reply Quote 0
                    • J
                      JHplusUser @SteveITS
                      last edited by

                      @SteveITS said in Error after package update:

                      Can you double check your update branch is set to 24.11 if that's your pfSense version?

                      45d93c0c-ee86-4bcf-94a9-d0f5a218da56-image.png

                      1 Reply Last reply Reply Quote 0
                      • J
                        JHplusUser @SteveITS
                        last edited by JHplusUser

                        @SteveITS said in Error after package update:

                        https://redmine.pfsense.org/issues/15933

                        indeed same problem, unfortunately now simple solution

                        @SteveITS said in Error after package update:

                        https://forum.netgate.com/topic/195242/pfblockerng-3-2-0_16-causes-gui-crash-with-24-03/

                        Solution here seems to be:
                        "I upgraded to 24.11 RC from command line, and now all is working in GUI again."
                        but I already run 24.11

                        @SteveITS said in Error after package update:

                        "undefined function" may mean the PHP file containing that function isn't loading fully due to an error condition above that point. We were going with your comment that the file didn't exist on disk.

                        Currently I am able to locate the file, but wasn't able to locate the function in it...

                        1 Reply Last reply Reply Quote 0
                        • M
                          marcosm Netgate
                          last edited by

                          The function config_read_file() was introduced in 24.11. If pfSense actually reports version 24.11, then it's best re-install, install the System Patches package to apply the recommended patches, then restore.

                          1 Reply Last reply Reply Quote 1
                          • J
                            JHplusUser @Gertjan
                            last edited by JHplusUser

                            @Gertjan said in Error after package update:

                            Insert the USB drive with the pfSense 24.11 firm ware.

                            This seems to be the right one to download for my netgate 7100, am I wright?
                            a897acee-2e82-48be-a16b-d6cd36606737-image.png

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

                              @JHplusUser yes.

                              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
                              • GertjanG
                                Gertjan @JHplusUser
                                last edited by

                                @JHplusUser said in Error after package update:

                                I was able to locate the file config.lib.inc and it seems the function config_read_file is indeed missing somehow?\

                                @marcosm said in Error after package update:

                                The function config_read_file() was introduced in 24.11. If pfSense actually reports version 24.11, then it's best re-install, install the System Patches package to apply the recommended patches, then restore.

                                The most recent /etc/inc/config.lib.inc isn't there, it's still the 24.03 version.
                                Consider the system as 'partially' upgraded == not good at all.

                                No option anymore, you have to re install clean.

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

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  JHplusUser @Gertjan
                                  last edited by

                                  @Gertjan i re-installed pfsense, directly used the old config -> was up and running again in 20 min

                                  after that I could install pfblockerng without a problem.

                                  Thanks for your help (and of others)

                                  noticed two things:

                                  1. indeed the update to 24.11 was not complete -> on the dashboard it still mentioned the older version.

                                  2. now i remain having the same fault as i started off with at the beginning, before updating my pfsense incl packagers.

                                  "An error occurred while uploading the encrypted Netgate pfSense Plus configuration to https://acb.netgate.com/save (Empty reply from server) @ 2025-01-25 17:00:01
                                  An error occurred while uploading the encrypted Netgate pfSense Plus configuration to https://acb.netgate.com/save (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to acb.netgate.com:443 ) @ 2025-01-25 17:00:02"

                                  It was this error that made me updating my pfsense as well as all packages leading up to the problems with pfblocker ng.

                                  Any idea how to solve this?

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

                                    @JHplusUser Does it still let you rerun the upgrade? I believe it’s possible to do so via command line but an actual reinstall is arguably cleaner.

                                    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.