Lost power, can't boot!
-
Today my power went off and the ups was going down after 30 minutes..... When the power was up again, my PFSense config wont start anymore.
I can connect from console but I'm stuck.... I've done a fsck but thats it. Below I wil post the error messages. Does anyone has a clue how to get this config startet again?
FreeBSD/amd64 (Amnesiac) (ttyu0)
2024-10-25T22:04:04.916962+02:00 - login 601 - - login on ttyu0 as root
Fatal error: Uncaught ValueError: Path cannot be empty in /etc/inc/notices.inc:135
Stack trace:
#0 /etc/inc/notices.inc(135): fopen('', 'w')
#1 /etc/inc/config.lib.inc(95): file_notice('config.xml', 'No config.xml f...', 'pfSenseConf)
#2 /etc/inc/config.gui.inc(53): parse_config()
#3 /etc/inc/auth.inc(34): require_once('/etc/inc/config...')
#4 /etc/inc/openvpn.inc(36): require_once('/etc/inc/auth.i...')
#5 /etc/inc/filter.inc(30): require_once('/etc/inc/openvp...')
#6 /etc/inc/ipsec.inc(25): require_once('/etc/inc/filter...')
#7 /etc/inc/gwlb.inc(27): require_once('/etc/inc/ipsec....')
#8 /etc/inc/functions.inc(35): require_once('/etc/inc/gwlb.i...')
#9 /etc/inc/notices.inc(26): require_once('/etc/inc/functi...')
#10 /etc/inc/config.inc(37): require_once('/etc/inc/notice...')
#11 /etc/rc.banner(27): require_once('/etc/inc/config...')
#12 {main}
thrown in /etc/inc/notices.inc on line 135
PHP ERROR: Type: 1, File: /etc/inc/notices.inc, Line: 135, Message: Uncaught ValueError: Pat5
Stack trace:
#0 /etc/inc/notices.inc(135): fopen('', 'w')
#1 /etc/inc/config.lib.inc(95): file_notice('config.xml', 'No config.xml f...', 'pfSenseConf)
#2 /etc/inc/config.gui.inc(53): parse_config()
#3 /etc/inc/auth.inc(34): require_once('/etc/inc/config...')
#4 /etc/inc/openvpn.inc(36): require_once('/etc/inc/auth.i...')
#5 /etc/inc/filter.inc(30): require_once('/etc/inc/openvp...')
#6 /etc/inc/ipsec.inc(25): require_once('/etc/inc/filter...')
#7 /etc/inc/gwlb.inc(27): require_once('/etc/inc/ipsec....')
#8 /etc/inc/functions.inc(35): require_once('/etc/inc/gwlb.i...')
#9 /etc/inc/notices.inc(26): require_once('/etc/inc/functi...')
#10 /etc/inc/config.inc(37): require_once('/etc/inc/notice...')
#11 /etc/rc.banner(27): require_once('/etc/inc/config...')
#12 {main}
thrown
Fatal error: Uncaught ValueError: Path cannot be empty in /etc/inc/notices.inc:135
Stack trace:
#0 /etc/inc/notices.inc(135): fopen('', 'w')
#1 /etc/inc/config.lib.inc(1154): file_notice('phperror', 'PHP ERROR: Type...', 'PHP errors')
#2 [internal function]: pfSense_clear_globals()
#3 {main}
thrown in /etc/inc/notices.inc on line 135- Logout (SSH only) 9) pfTop
- Assign Interfaces 10) Filter Logs
- Set interface(s) IP address 11) Restart webConfigurator
- Reset webConfigurator password 12) PHP shell + pfSense tools
- Reset to factory defaults 13) Update from console
- Reboot system 14) Enable Secure Shell (sshd)
- Halt system 15) Restore recent configuration
- Ping host 16) Restart PHP-FPM
- Shell
Enter an option:
-
The fastest way back from that is usually just to reinstall and restore the config.
If you have network access still (or can manually add it) you might be able to run a pkg re-install to pull back in the files it can't access:
https://docs.netgate.com/pfsense/en/latest/troubleshooting/upgrades.html#upgrade-not-offered-library-errorsSteve
-
@netpatje said in Lost power, can't boot!:
Today my power went off and the ups was going down after 30 minutes.....
The UPS didn't tell pfSense to shut down safely ?
-
@netpatje said in Lost power, can't boot!:
Today my power went off and the ups was going down after 30 minutes....
Do you not have either of the
apcupsd
ornut
packages installed? If not, you should install one of those and configure it. Those packages communicate with the UPS, and when the battery is expiring during a power loss run, will gracefully issue a shutdown command to pfSense. That way, you won't experience disk corruption like you have now.If your UPS is an APC model, then install the
apcupsd
package. If using another brand of UPS, then thenut
package is probably better. You can install either package from the SYSTEM > PACKAGE MANAGER menu in pfSense. -
@netpatje said in Lost power, can't boot!:
No config.xml f...
See if you have a config file in /conf/backup...menu option 15 if it lets you use that.
A reinstall will use ZFS which is more resilient towards power loss.