Error after package update
-
@elexir said in Error after package update:
pfBlockerNG-Dev
The latest version, or development version, is written with the latest version of pfSense in mind.
That not 24.03, but 24.11.
Next time : always start by checking what the latest pfSense version is and if needed, update pfSense first.
Then, start to think about upgrading packages. -
-
New to forum
Got the same problem here.
First updated PFsense to 24.11
Then updated my packages.
After this got same crash with PFBlockerNG
After deinstalling problem disappeared
Installed pfBlockerNG-devel -> same problem
De-installend pfBlockerNG-devel -> problem disappeared.
Unfortunately I'm a low-level experienced user...
Hope I don't have to do a backward install or even worse a new install of my pfsense.
Do want to use pfblocker again, but without some help I wont be able to without crashing my system.
Is there any solution?
I'm using pfsense AND pfblockerng already for 10+ years, without much trouble. Hope to keep doing so.
Thanks for any assistance! -
@JHplusUser said in Error after package update:
After this got same crash with PFBlockerNG
pfSense PLus 24.11
and the latest 'dev' pfBlockerng version ?You saw :
Call to undefined function config_read_file() in /usr/local/pkg/pfblockerng/pfblockerng.inc
?
-
@Gertjan I tried again: Installing the pfblockerng dev (3.2.1_20).
Now got an error saying it couldn't finish the install properly and also got this error:
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(888): require_once('/usr/local/pkg/...')
#2 /etc/rc.packages(76): install_package_xml()
#3 {main}
thrown @ 2025-01-21 11:15:42It has however installed the pf Blocker NG-devel version.
now tried do de-install and do a re-install again...succesfull de-install of version 3.2.1_20 (dev version)
However I get this error now:
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}
thrown @ 2025-01-21 11:20:42Tried installing it again: know got succes at the end, but in the log also an php error:
This is the install log:Installing pfSense-pkg-pfBlockerNG-devel...
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 13 package(s) will be affected (of 0 checked):New packages to be INSTALLED:
gnugrep: 3.11 [pfSense]
grepcidr: 2.0_1 [pfSense]
iprange: 1.0.4_2 [pfSense]
jq: 1.7.1 [pfSense]
libmaxminddb: 1.11.0 [pfSense]
lighttpd: 1.4.76 [pfSense]
lua54: 5.4.7 [pfSense]
nettle: 3.10_1 [pfSense]
pfSense-pkg-pfBlockerNG-devel: 3.2.1_20 [pfSense]
py311-maxminddb: 2.6.2 [pfSense]
py311-sqlite3: 3.11.10_8 [pfSense]
rsync: 3.3.0 [pfSense]
xxhash: 0.8.2_1 [pfSense]Number of packages to be installed: 13
The process will require 17 MiB more space.
[1/13] Installing nettle-3.10_1...
[1/13] Extracting nettle-3.10_1: .......... done
[2/13] Installing lua54-5.4.7...
[2/13] Extracting lua54-5.4.7: ......... done
[3/13] Installing xxhash-0.8.2_1...
[3/13] Extracting xxhash-0.8.2_1: .......... done
[4/13] Installing libmaxminddb-1.11.0...
[4/13] Extracting libmaxminddb-1.11.0: .......... done
[5/13] Installing py311-sqlite3-3.11.10_8...
[5/13] Extracting py311-sqlite3-3.11.10_8: ........ done
[6/13] Installing lighttpd-1.4.76...
===> Creating groups
Using existing group 'www'
===> Creating users
Using existing user 'www'
[6/13] Extracting lighttpd-1.4.76: .......... done
[7/13] Installing gnugrep-3.11...
[7/13] Extracting gnugrep-3.11: .......... done
[8/13] Installing jq-1.7.1...
[8/13] Extracting jq-1.7.1: .......... done
[9/13] Installing grepcidr-2.0_1...
[9/13] Extracting grepcidr-2.0_1: ..... done
[10/13] Installing iprange-1.0.4_2...
[10/13] Extracting iprange-1.0.4_2: ..... done
[11/13] Installing rsync-3.3.0...
[11/13] Extracting rsync-3.3.0: .......... done
[12/13] Installing py311-maxminddb-2.6.2...
[12/13] Extracting py311-maxminddb-2.6.2: .......... done
[13/13] Installing pfSense-pkg-pfBlockerNG-devel-3.2.1_20...
[13/13] Extracting pfSense-pkg-pfBlockerNG-devel-3.2.1_20: .......... done
Saving updated package information...
done.
Loading package configuration... done.
Configuring package components...
Loading package instructions...
<pre style="white-space: pre-wrap;">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(888): require_once('/usr/local/pkg/...')
#2 /etc/rc.packages(76): install_package_xml()
#3 {main}
thrown</pre>=====
Message from grepcidr-2.0_1:--
===> NOTICE:The grepcidr port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:https://bugs.freebsd.org/bugzilla
More information about port maintainership is available at:
https://docs.freebsd.org/en/articles/contributing/#ports-contributing
Message from rsync-3.3.0:
--
Some scripts provided by rsync, such as rrsync,
require Python, which is not installed by default.Cleaning up cache...done.
SuccessThis is the error i'm gettingin the upper right corner:
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(888): require_once('/usr/local/pkg/...')
#2 /etc/rc.packages(76): install_package_xml()
#3 {main}
thrown @ 2025-01-21 11:22:24When I keep the install i get this error when i return to my dashboard:
This is the crash report: Crash report begins. Anonymous machine information:
amd64
15.0-CURRENT
FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:08:46 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/amd64/AKWlAIiM/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/FreeBSCrash report details:
PHP Errors:
[21-Jan-2025 11:15:42 Europe/Amsterdam] PHP Fatal error: 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(888): require_once('/usr/local/pkg/...')
#2 /etc/rc.packages(76): install_package_xml()
#3 {main}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
[21-Jan-2025 11:20:42 Europe/Amsterdam] PHP Fatal error: 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}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
[21-Jan-2025 11:22:24 Europe/Amsterdam] PHP Fatal error: 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(888): require_once('/usr/local/pkg/...')
#2 /etc/rc.packages(76): install_package_xml()
#3 {main}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
[21-Jan-2025 11:22:38 Europe/Amsterdam] PHP Fatal error: 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(711): require_once('/usr/local/pkg/...')
#2 /etc/rc.start_packages(66): sync_package()
#3 {main}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
[21-Jan-2025 11:24:51 Europe/Amsterdam] PHP Fatal error: 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 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
#2 /usr/local/www/index.php(539): include('/usr/local/www/...')
#3 {main}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693
[21-Jan-2025 11:26:22 Europe/Amsterdam] PHP Fatal error: 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 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
#2 /usr/local/www/index.php(539): include('/usr/local/www/...')
#3 {main}
thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 693No FreeBSD crash data found.
And in right upper corner it says: 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 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
#2 /usr/local/www/index.php(539): include('/usr/local/www/...')
#3 {main}
thrown @ 2025-01-21 11:24:51
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 /usr/local/www/widgets/widgets/pfblockerng.widget.php(36): require_once('/usr/local/pkg/...')
#2 /usr/local/www/index.php(539): include('/usr/local/www/...')
#3 {main}
thrown @ 2025-01-21 11:26:22This problem only disappears after a de-install of the pfBlockerNG-devel leaving me without a working version of pfBlockerNG.
After the deinstall i get this message in the right upper corner:
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}
thrown @ 2025-01-21 11:28:26**A lot of information, but I hope i helps us find a solution.
Thanks!!!**
-
@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 !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. -
@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!
-
@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.htmlIf 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.
-
@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
-
@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
- Check that the pfSense device is powered down.
- Insert the USB drive with the pfSense 24.11 firm ware.
- Connect the "most important interface ... nope, non an a RJ45 .... the console cable ! The one you got with your device.
- 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)
- Power up your pfSense.
- 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. -
@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. EtcI 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
-
@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...
-
@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.
-
@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?
-
@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...
-
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. -
@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?
-
@JHplusUser yes.
-
@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.