No config.xml found
-
Hi All,
I've a fresh 2.5 installation on APU2.
The configuration is not saved after a power cycle and I've this message:
"No config.xml found, attempting last known config restore. @ 2021-03-08 23:34:42
pfSense is restoring the configuration /conf/backup/config-1615242695.xml @ 2021-03-08 23:34:43 ".
Is it a fault on my hardware?Thank you!
-
Is the file created after system startup ?
It is here / cf/conf/config.xml
Then rebooting the system via the GUI - do not reboot by removing the power !Check disk size left, and do a How to Run a pfSense Software File System Checkjust to be sure.
-
By "power cycle" do you mean a clean reboot?
Or did you yank the power without doing anything?
If the latter, removing power likely caused filesystem corruption and caused the error. Don't do that.
-
@gertjan said in No config.xml found:
Then rebooting the system via the GUI - do not reboot by removing the power !
Or at least use the reboot command at the command line.
Don't do that.
Do people still to that? With all the years people have been using computers, you'd think they'd know better.
Several years ago, when I was at IBM, I had to fix one computer where the user simply turned off the power bar at the end of the day. Her disk was so full of crap that the computer wouldn't run anymore.
-
Hi All,
I know about the possible corruption of file system on a PC removing the power!
But I know also that there are some mechanisms to avoid it.
On prevoius versions of pfSense I never had such issues!
I've used pfSense on Alix for 10 years without this problem.
What's changed now? -
I have been using pfsense for about 5 years and have never seen that. I also have several backups, should it be necessary to replace that file. Check to see if that file is there, then reboot properly and see if it's still there.
-
Any number of things changed, the hardware, the disk controller/disk itself, the OS, etc.
Sometimes the OS will cache writes, but also disks lie to the OS about whether or not they have flushed data to storage in the name of speed. Some filesystems cope better than others. If you "write" to disk and immediately yank the power there is no telling what state you left things in.
ZFS is more resilient against this kind of problem than UFS. It's not perfect, but much better.
-
@gtrovato , it could happen with different hardware other than Netgate hardware. This means your writing/reading speeds are sometimes not synchronize,as a result corrupted.
Just unplug and re-plug the power switch, do it over again. Or you can boot (S)ingle user with pfsense bootable usb and type: fsck -y
/sbin/reboot -
I just had this issue after several power outages in a row. My UPS failed also. What happened was that pfsense backed up an empty configuration file, no doubt because of the rapid power cycling. It then would attempt to restore it on boot, and hang.
The solution was to log in, find the offending backup file (zero size) and delete it. After that, the router booted using the previous backup file.
This is probably a bug.
-
It's not a bug per se, but a known problem with UFS in FreeBSD, and with many filesystems in general. Removing power unexpectedly leads to an unclean filesystem. The fix is to use a proper UPS and avoid unclean shutdowns where possible.
If you want to have better protection against it, use ZFS if you can. It's much better than UFS when it comes to avoiding this kind of problem, as mentioned earlier in the thread..
-
I just experienced this in my brand new SG-5100. I gracefully shut down computers, of course, but never in my 20-year career in IT have I seen an appliance corrupt its config because the power was pulled. That's kind the whole purpose of using appliances versus VMs.
-
I still believe that adding a bit of logic would make the appliance more resilient. I understand "filesystem is not our problem", but "this config backup is unusable so let's try the one before" seems pretty reasonable to me.
-
It does try to use backups if the main configuration is corrupt. By default about 30 such backups are kept on disk, and it will try them all. There was recently a bug in that code, but it's been fixed in 2.5.2.
Also, it's possible that other parts of the filesystem are corrupt, not just the configuration file(s).
If you are worried about that kind of thing, reinstall using ZFS and also use a UPS.
-
That explains it, thanks @jimp .
I think you're referring to https://redmine.pfsense.org/issues/11748Based on my experience with 2.5.1, I was under the mistaken impression that this was not a feature.
-
Yes, that is the issue. But to hit that problem both the current and first backup both had to be corrupted in just the wrong way.
-
I made the changes again since the previous config save. Then downloaded the xml for safe keeping. Attempted to put the device in production but it wasn't working. So I took it back down and tried to see what's up. Now it's bootlooping, orange LEDs flashing every minute, never comes up. This is a brand new device and even if it could be wiped, reloaded, I'm not gonna put such an unreliable device in production. RMA requested.