patrix87 / PowerShellGSM

A Comprehensive PowerShell Tool for Simple Automated Game Server Management.
https://github.com/patrix87/PowerShellGSM/
MIT License
109 stars 19 forks source link

Icarus Server errors and shutdown constantly #43

Closed Runaris closed 8 months ago

Runaris commented 8 months ago

I am unsure what's going on here but its only affecting my Icarus Server after weekly update 108 hotfix. Server will start, but will only stay up for a very short amount of time (about 3minutes) before the client checks the server and it just automatically crashes sending it into a boot loop (where the scheduler will go round in circles because it crashed) Haven't been able to cleanly host it since using this really handy program.

Torath0071 commented 8 months ago

Hi, i've the same issue.

And i found a solution to the problem (i will make a pull request for that)

In the file main.ps1 make these changes

Line 115 : if (($Server.AutoRestartOnCrash) -and ((New-TimeSpan -Start Get-Date -End $TasksSchedule.NextAlive) -le 0)) { Line 130 : if (($Server.AutoUpdates) -and ((New-TimeSpan -Start Get-Date -End $TasksSchedule.NextUpdate) -le 0)) { Line 145 : if (($Server.AutoRestart) -and ((New-TimeSpan -Start Get-Date -End $TasksSchedule.NextRestart) -le 0)) {

The problem arose from the fact that the date of the next update was compared with the current date 01/01/2024 is less than 12/31/2023 (compared values) and therefore launches a full update.

TOXid commented 8 months ago

Line 115 : if (($Server.AutoRestartOnCrash) -and ((New-TimeSpan -Start Get-Date -End $TasksSchedule.NextAlive) -le 0)) {

1 It's not working....

Torath0071 commented 8 months ago

Oh yes, sorry, I'm not really familiar with Powershell. Try to surround Get-Date like this (Get-Date)

Line 115 : if (($Server.AutoRestartOnCrash) -and ((New-TimeSpan -Start (Get-Date) -End $TasksSchedule.NextAlive) -le 0)) { Line 130 : if (($Server.AutoUpdates) -and ((New-TimeSpan -Start (Get-Date) -End $TasksSchedule.NextUpdate) -le 0)) { Line 145 : if (($Server.AutoRestart) -and ((New-TimeSpan -Start (Get-Date) -End $TasksSchedule.NextRestart) -le 0)) {

TOXid commented 8 months ago

Oh yes, sorry, I'm not really familiar with Powershell. Try to surround Get-Date like this (Get-Date)

No, it still doesn’t work, there’s some kind of system time conversion error. I don’t have time to read and screenshot.

patrix87 commented 8 months ago

Should be resolved in latest release