Do I need a factory reset? "Call to undefined function gettext() in /etc/inc/certs.inc:48"
-
I have the SG-3100 running pfSense Plus 22.09-DEVELOPMENT (I believe it was a July build, but cannot currently confirm)
Some Background:
Since around September, I've been having an issue of my DNS Resolver randomly crashing. There weren't any recent changes, so I decided I would go back to the stable branch to fix the problem, but since the stable version was 22.05, it wouldn't let me downgrade.
I installed the Service Watchdog to restart my DNS Resolver and decided I'd just wait until a new stable version came out that I could upgrade to.
Fast forward to the beginning of November and I started seeing the orange light flashing on the box, meaning an update is available. Well, it turned out that I was getting an "Unable to check for updates" error. I searched online, but couldn't find anything helpful to my situation; some people had fixed a similar problem by updating the repo urls in the
/usr/local/etc/pkg/repos/pfSense.conf
file, but that was not issue. I gave up and decided I'd wait a bit to see if it resolved itself and if it doesn't, then search again later to see if anyone else posted about the problem.The problem:
Fast forward again to today and I found someone mention online that they were able to successfully update using option
13) Update from console
in the CLI. I gave that a go and it looked like everything was running fine until the end. It seemed to update a lot of packages just fine and then the system rebooted to do the system upgrade.When the system came back on, this error popped up a few times:
Fatal error: Uncaught Error: Call to undefined function gettext() in /etc/inc/certs.inc:48
And this one at least once:
Fatal error: Uncaught Error: Call to undefined function log_error() in /etc/inc/config.lib.inc:1165
Since then,
- I have not been able to access internet through the firewall,
- I have not been able to access the pfSense interface from the browser
- I have not been able to successfully run any CLI options except
8) Shell
and10) Filter Logs
. All the other options throw the errorFatal error: Uncaught Error: Call to undefined function gettext() in /etc/inc/certs.inc:48
Rebooting the system does not help. I have even tried using a paperclip to reset the system to factory settings, but that didn't seem to do anything.
One of the lines that was spit out while doing the updates (unfortunately, I do not have the full output anymore, unless it's in a log somewhere) was
pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
. So, I tried running that, but it doesn't seem to be able to connect to the internet at all now:[22.09-DEVELOPMENT][root@]/root: pkg bootstrap -f The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:armv7/quarterly, please wait... pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:armv7/quarterly/Latest/pkg.txz: Non-recoverable resolver failure Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:12:armv7/quarterly. Consider changing PACKAGESITE. [22.09-DEVELOPMENT][root@]/root:
Another thing I found interesting is in the output when trying to run option
13) Update from console
again. It complains that the file'/usr/local/etc/pkg/repos//pfSense.conf'
does not exist. There's an extra/
before the file name that shouldn't be there. No idea if that would cause the rest of these issues, but thought I should point it out. The'/usr/local/etc/pkg/repos/pfSense.conf'
file does indeed exist. If helpful, here's the full output from option 13.Enter an option: 13 Fatal error: Uncaught Error: Call to undefined function gettext() in /etc/inc/certs.inc:48 Stack trace: #0 /etc/inc/functions.inc(34): require_once() #1 /etc/inc/notices.inc(26): require_once('/etc/inc/functi...') #2 /etc/inc/config.gui.inc(39): require_once('/etc/inc/notice...') #3 /etc/inc/auth.inc(33): require_once('/etc/inc/config...') #4 /etc/inc/captiveportal.inc(29): require_once('/etc/inc/auth.i...') #5 /etc/inc/service-utils.inc(25): require_once('/etc/inc/captiv...') #6 /etc/inc/pkg-utils.inc(26): require_once('/etc/inc/servic...') #7 Command line code(1): require_once('/etc/inc/pkg-ut...') #8 {main} thrown in /etc/inc/certs.inc on line 48 PHP ERROR: Type: 1, File: /etc/inc/certs.inc, Line: 48, Message: Uncaught Error: Call to undefined function gettext() in /etc/inc/certs.inc:48 Stack trace: #0 /etc/inc/functions.inc(34): require_once() #1 /etc/inc/notices.inc(26): require_once('/etc/inc/functi...') #2 /etc/inc/config.gui.inc(39): require_once('/etc/inc/notice...') #3 /etc/inc/auth.inc(33): require_once('/etc/inc/config...') #4 /etc/inc/captiveportal.inc(29): require_once('/etc/inc/auth.i...') #5 /etc/inc/service-utils.inc(25): require_once('/etc/inc/captiv...') #6 /etc/inc/pkg-utils.inc(26): require_once('/etc/inc/servic...') #7 Command line code(1): require_once('/etc/inc/pkg-ut...') #8 {main} thrown Fatal error: Uncaught Error: Call to undefined function log_error() in /etc/inc/config.lib.inc:1165 Stack trace: #0 [internal function]: pfSense_clear_globals() #1 {main} thrown in /etc/inc/config.lib.inc on line 1165 >>> Updating repositories metadata... pkg-static: Unable to open '/usr/local/etc/pkg/repos//pfSense.conf':No such file or directory pkg-static: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended No active remote repositories configured. >>> Upgrading pkg... failed. Fatal error: Uncaught Error: Call to undefined function gettext() in /etc/inc/certs.inc:48 Stack trace: #0 /etc/inc/functions.inc(34): require_once() #1 /etc/inc/notices.inc(26): require_once('/etc/inc/functi...') #2 /etc/inc/config.inc(51): require_once('/etc/inc/notice...') #3 /etc/rc.banner(27): require_once('/etc/inc/config...') #4 {main} thrown in /etc/inc/certs.inc on line 48
The Ask:
-
Is there a way I get the system back up and running without doing a factory reset?
-
If I need to do a factory reset, is there a way I can do it without using option
4) Reset to factory defaults
or the pinhole "reset" button (since I've already tried both of those and they don't work)?
Honestly, at this point, I'd be okay with a factory reset, but since I wouldn't be going back to 22.09-Dev, I'm just a bit worried my backup file won't import correctly, which is fine since I can still use it as a guide for setting everything up again, but just not ideal.
-
@tamaz said in Do I need a factory reset? "Call to undefined function gettext() in /etc/inc/certs.inc:48":
Is there a way I get the system back up and running without doing a factory reset?
A factory reset will put in place a default config file (only). Your system tells you files are missing.
Get a copy of 22.05 (Use Netgate TAC / support site). Build your USB drive/key and have your box booting from it.
Import your 22.05 config.Be careful : importing a 22.09 based config can have unknown results as 22.05 doesn't know what '22.09' is.
@tamaz said in Do I need a factory reset? "Call to undefined function gettext() in /etc/inc/certs.inc:48":
pkg+http://pkg.FreeBSD.org/FreeBSD:12:armv7/quarterly
Your are fetching from the FreeBSD repository.
And armv7 means an arm processor, or you use a 3100 so it's Intel (amd) based ....
IMHO : consider your system lost. backup config and bail out ^^
Re install and done. -
@tamaz said in Do I need a factory reset? "Call to undefined function gettext() in /etc/inc/certs.inc:48":
pinhole "reset" button
That button on the 3100 (and many other models) just performs a hardware reset, like turning off power. Generally, not recommended as it can cause file system corruption.
23.01, as it will be called, changes both the underlying OS and the PHP version. I'd expect a massive amount of changes there so it's not surprising to me it's been delayed twice.
Reinstalling is probably the easiest and safest way to recover. It's not that difficult if you have access to the device:
https://docs.netgate.com/pfsense/en/latest/solutions/sg-3100/reinstall-pfsense.htmlPer
https://docs.netgate.com/pfsense/en/latest/config/factory-defaults.html
"This process does not remove any changes made to the file system, it only resets the configuration.If system files have been corrupted or altered in an undesirable way, the best practice is to make a backup and reinstall from installation media."
-
@gertjan Thanks for replying! I submitted a support ticket, so I'll try reinstalling. Unfortunately, I don't have a 22.05 config, but this will give me a chance to rework some stuff I've been putting off, using the 22.09 config as a guide.
The 3100 is an arm system, by the way.
-
@steveits Oh! Good to know! I guess that's what I get for assuming, but now I understand why the button didn't seem to do anything.
-
J jimp moved this topic from Problems Installing or Upgrading pfSense Software on