Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x => Topic started by: Skalviai on October 07, 2021, 07:41:43 AM

Title: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 07, 2021, 07:41:43 AM
1) SME server installation.
2) Yum update.
3) Restart.
4) AC lost.
5) AC restore
5) The server starts and asks "Restore from backup", "Select administrator password", ....

Tested three times, with different HDD (nvme, ssd, sata)
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: TerryF on October 07, 2021, 08:35:55 AM
Try this Go thru the prompts when back at terminal cli run a config update and reboot, can also do same from console,

Did you install to three different media run an update and pull the power plug
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: ReetP on October 07, 2021, 12:03:34 PM
3) Restart.
4) AC lost.

Exactly what point in the boot process did the power go off?

Terry, I am wondering if the power failure occurs during boot and prior to it starting to configure itself?

Is it worth a VM and just hit the off switch a few different times during the boot phase and seeing what happens?
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 07, 2021, 12:05:44 PM
Did you install to three different media run an update and pull the power plug

Yes.

PC for SME Server - CPU - Intel i7-9700K / ASUS PRIME Z390M-PLUS / 16 GB /
Tested on:
1) nVME Samsung EVO 970 250GB
2) SSD Kingston ssdNow 300 - 240GB
3) SATA Seageate Baracuda 1 TB

It is not always bad after turning off the power. But from the third or fourth time it happens.

After yum update, we restart the server.
When the login screen appears, unplug the power plug.

When the power is turned on.
Server prompt to "restore from backup" - answer "no"
Server prompt "Choose an administrator password" - answer - password "*****"

login as admin - select "reboot / reconfigure / shutdown" -> reconfigure
After reconfiguration, the server starts normally

Video: https://textus.lt/bin/VID_20211007_132349.mp4
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: TerryF on October 07, 2021, 01:34:59 PM
So what I said was the solution, no problem...
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: TerryF on October 07, 2021, 01:37:03 PM
Is it worth a VM and just hit the off switch a few different times during the boot phase and seeing what happens?

Have not lost power but have got into a similar situation with a VM by just doing a stop in my impatrience :-)
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 07, 2021, 06:56:58 PM
So what I said was the solution, no problem...

Huge problem.
We have installed a new server.
We have installed Joomla.
We have installed PhpMyAdmin

Test "Lost power"

After reconfiguration, stop working Joomla site, say "Error..."
 :-(

SME Server 10 is still not available for business use
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 07, 2021, 07:02:56 PM
Have not lost power but have got into a similar situation with a VM by just doing a stop in my impatrience :-)

SME Server version 9.2 was very good. It always worked without problems after power lost
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: TerryF on October 07, 2021, 09:19:21 PM
So I have to ask Why?

Why pull a power plug when the sytem is running through its startup and system configurations, Why?

I'm not surprised an issue has been introduced by cycling the power as the sytem is starting.
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 07, 2021, 09:39:45 PM
Why pull a power plug when the sytem is running through its startup and system configurations, Why?

The power plug is for outlets only when the server is fully started and the monitor has LOGIN.

One test was performed one hour after the server started.
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: TerryF on October 07, 2021, 09:56:16 PM
One test was performed one hour after the server started.

When login prompt first appears sytem is still in throes of final system configs..

""One Test" how many times was the power cycled, sorry but who knows what glitches were introduced at the first power out and then any subsequent, sorry but just dont see this is an issue.

Joomla, phpmyadmin both rely on MySQL/mariaDB some inconsistences may have been introduced there.
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: ReetP on October 08, 2021, 01:30:13 AM
Quote
SME Server version 9.2 was very good. It always worked without problems after power lost

Different OS, and probably different hardware. Things change.

Can I interest you in a UPS??

You really should not be putting a machine into production unless it is fully configured AND tested AND backed up.

Trying a power off test whilst still configuring is liable to break any server. It is hardly a true test.

And if you are running this for business I can't imagine you would not use a UPS. It makes no sense.

Quote
Have not lost power but have got into a similar situation with a VM by just doing a stop in my impatrience :-)

Indeed......

So, any server that gets a hard crash risks failure and leaving the system in an indeterminate state, hence using UPS to prevent it.

And regular backups for when that fails.

If you think you can make the software more 'crash proof' then please send us your patch.

In the meantime your real task is to prevent a hard crash.

Personally, if you are worried about a power cord being ripped out then get a real server, with dual PSUs in case one fails, and lock it in a rack with the rackmount UPS.

Even better, run Proxmox on it and put your SME in a VM and snaphot it...
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Skalviai on October 08, 2021, 07:02:26 AM
Personally, if you are worried about a power cord being ripped out then get a real server, with dual PSUs in case one fails, and lock it in a rack with the rackmount UPS.

Yes, the server is connected via a rackmount UPS.
I came across this problem by accident when we fully moved the server to SME 10.
And the server was temporarily not connected to the UPS.

So I started testing to see if it would cause any problems in the future.

And all the work of moving the server to SME 10 will need to be repeated :-( 
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: ReetP on October 08, 2021, 10:00:32 AM
As I said, software will not cope with all scenarios.

Hence Raid, redundant PSU, locked racks etc.

All are there to try and prevent the OS having a hard crash by shuttting it down gracefully.

Quote
server was temporarily not connected to the UPS.

I'm not sure what you expect..... Nothing much is going to protect you there. The answer is it should not have been running without the UPS connected.

Try pulling the power on any other OS during install/config and see what happens.

Yes if it is fully configured you *may* 'get away with it'. But zero guarantees, hence backups, reduncancy etc.

'YMMV'
Title: Re: SME 10 asks "Restore from backup" after power failure
Post by: Jean-Philippe Pialasse on October 09, 2021, 03:27:15 PM
with this kind of situation the only safe OS is one with read only file system that will reboot at its original factory setting with all what in memory lost.

as said ReetP write errors WILL almost ALWAYS occurs when cutting the power on  a read write filesystem. Most of the time you will be lucky with only user files with small errors in the files you will only see weeks after.
and sometime you will see system errors that will prevent it to work. most probably when you unplugged system was configuring the db and writing it, file was corrupt and the. reinitialised where values where missing.  hence trying to restore.

to prevent that hardware raid also have battery on them with onboard memory to allow resuming current write action after power is restored and even that is not miraculous.