PowerShellGSM icon indicating copy to clipboard operation
PowerShellGSM copied to clipboard

Ark survival ascended server: daily reboot problem

Open TOXid opened this issue 3 years ago • 8 comments

Automatic daily reboot does not work if the warning time is set to be greater than the task update time.

Timers = [System.Collections.ArrayList]@(1140, 600, 60)

With such a timer, the server sends only the first warning to the chat and then the next time the task is launched in the scheduler, it simply sets a new reboot time without completing the current task.

Verifying Dependencies...
Importing Server Configuration...
Locking Process.
Running Tasks for ark_survival_ascended ...
Getting Tasks Schedule...
Checking Alive State
Server is Alive
Updating Tasks Schedule...
Too soon for Update check
Server is due for Restart
Updating Tasks Schedule...
Verifying Server installation...
Verifying Server State...
Command Sent.
Server is responding to remote messages.
Server is running, warning users about upcomming restart.
Command Sent.
Waiting 1140 seconds before next warning...

This stops the execution of the script.

Edit this value :

https://github.com/patrix87/PowerShellGSM/blob/98dfc698cc8bc6558f9947bfc967d9f813d92095/global.psm1#L48

It did not help. It looks like the reboot script simply stops working after 5 minutes, or when the task starts. I set the reboot to 5:00. At 5:00

Verifying Dependencies...
Importing Server Configuration...
Locking Process.
Running Tasks for ark_survival_ascended ...
Getting Tasks Schedule...
Too soon for Alive check
Too soon for Update check
Server is due for Restart
Updating Tasks Schedule...
Verifying Server installation...
Verifying Server State...
Command Sent.
Server is responding to remote messages.
Server is running, warning users about upcomming restart.
Command Sent.
Waiting 1140 seconds before next warning...

And then every 5 minutes for a 35 minute lock:

**********************
PS>TerminatingError(): "System error."
**********************

The daily reboot cycle never completed. So at some point the reboot script simply stops working, perhaps you need to initialize the launch of the run.cmd file, it reboots correctly with a 30-minute cooldown.

Auto-update with the same problem.

TOXid avatar Nov 15 '23 20:11 TOXid

Set the LockTimeout to a value that is higher than your reboot cycle time. Right now your reboot cycle takes a whole 30 minutes (which I think is very exaggerated) Then set the LockTimeout to 35 minutes or 60 minutes.

patrix87 avatar Nov 15 '23 21:11 patrix87

The LockTimeout was set for 35 minutes, but apparently the script stopped working after 5 minutes, when a new task was launched in the task manager. There was only the first warning about 30 minutes in the chat. If it were a matter of insufficient blocking time, then at least there would be a second message about 10 minutes. But in the chat every 40 minutes there was only a message about 30 minutes before the restart, when the server was trying to update.

Regarding the long time - this is necessary for this game, since players cannot leave a cave or boss in 5 minutes, and this is guaranteed to lead to the loss of all equipment and dinos.

TOXid avatar Nov 15 '23 23:11 TOXid

I'm not sure what is the issue on your side but the auto-restart seems to be working on my side. Look into the ASA Logs for the server log. You should see the restart there.

patrix87 avatar Nov 20 '23 15:11 patrix87

Have you tried setting the restart time to 30 minutes? At 5 minutes everything works for me, at 30 minutes only the first message is sent to the chat.

TOXid avatar Nov 21 '23 15:11 TOXid

Same Problem here. Restart is announced but never happens.

Ark Server Log:

[2023.11.22-04.27.29:313][851]2023.11.22_04.27.29: Saving world... [2023.11.22-04.27.29:339][851]2023.11.22_04.27.29: World Save Complete. Took: 0.888605 [2023.11.22-04.39.21:690][192]2023.11.22_04.39.21: SERVER: The server will restart in 15 minutes ! [2023.11.22-04.42.29:306][786]2023.11.22_04.42.29: Saving world... [2023.11.22-04.42.29:321][786]2023.11.22_04.42.29: World Save Complete. Took: 0.869619 [2023.11.22-04.57.29:272][728]2023.11.22_04.57.29: Saving world... [2023.11.22-04.57.29:297][728]2023.11.22_04.57.29: World Save Complete. Took: 0.836652 [2023.11.22-05.12.29:322][660]2023.11.22_05.12.29: Saving world... [2023.11.22-05.12.29:342][660]2023.11.22_05.12.29: World Save Complete. Took: 0.869061 [2023.11.22-05.14.20:631][989]2023.11.22_05.14.20: SERVER: The server will restart in 15 minutes ! [2023.11.22-05.27.29:322][581]2023.11.22_05.27.29: Saving world... [2023.11.22-05.27.29:346][581]2023.11.22_05.27.29: World Save Complete. Took: 0.855752 [2023.11.22-05.42.29:395][508]2023.11.22_05.42.29: Saving world... [2023.11.22-05.42.29:415][508]2023.11.22_05.42.29: World Save Complete. Took: 0.920924 [2023.11.22-05.44.21:829][877]2023.11.22_05.44.21: SERVER: The server will restart in 15 minutes ! [2023.11.22-05.57.29:318][418]2023.11.22_05.57.29: Saving world... [2023.11.22-05.57.29:340][418]2023.11.22_05.57.29: World Save Complete. Took: 0.834586 [2023.11.22-06.12.29:532][357]2023.11.22_06.12.29: Saving world... [2023.11.22-06.12.29:548][357]2023.11.22_06.12.29: World Save Complete. Took: 1.021681 [2023.11.22-06.19.22:788][732]2023.11.22_06.19.22: SERVER: The server will restart in 15 minutes ! [2023.11.22-06.27.29:571][276]2023.11.22_06.27.29: Saving world... [2023.11.22-06.27.29:582][276]2023.11.22_06.27.29: World Save Complete. Took: 1.049833

Manuell restart was necessary.

Ark Server Config-Massage timer

Timers = [System.Collections.ArrayList]@(600, 240, 50, 10)

global.psm1

LockTimeout = 30

GSM Log Running Instance:

Importing Server Configuration... Process Lock is too old, removing... Locking Process. Running Tasks for XXX ... Getting Tasks Schedule... Checking Alive State Server is Alive Updating Tasks Schedule... Checking on steamCMD if updates are avaiable for XXX... Install State: Fully Installed, Local Build ID: 12758048 Remote Build ID: 12767389 Updates are available for XXX, Proceeding with update process... Updating Tasks Schedule... Too soon for Restart Verifying Server installation... Verifying Server State... Command Sent. Server is responding to remote messages. Server is running, warning users about upcomming restart. Command Sent. Waiting 600 seconds before next warning...

EOF

GSM Log New Instance:

Importing Server Configuration... Process is locked, exiting.


Befehlsstartzeit: 20231122100905


PS>TerminatingError(): "Systemfehler"


Ende der Windows PowerShell-Aufzeichnung Endzeit: 20231122100905


EOF

GSM try to Start a new instance every 5min, but failed, cause old instance is still running

Aeneas1 avatar Nov 22 '23 09:11 Aeneas1

I'm having exactly the same issue

duartejbrito avatar Nov 23 '23 07:11 duartejbrito

I found the problem, it is in the file Register-Task.psm1

TOXid avatar Dec 14 '23 08:12 TOXid

Care to share the solution or details then?

simonghpub avatar Dec 14 '23 21:12 simonghpub