panel icon indicating copy to clipboard operation
panel copied to clipboard

Make crash detection configurable on a per-server basis.

Open adminmip opened this issue 6 years ago • 6 comments

Probably not a big deal to many, but it's kinda frustrating (more like odd) when Wings/console window assumes that the server is in a "Crashed State" when I issue the Minecraft in-game /restart command, when in reality I initated essentially a reboot.

The problem is that I'm not 100% sure if there is a solution, and I'm really just curious if there even is one. I'm not sure if wings has any way to detect the server stopping or restarting in-game.

I did notice that the crash log only shows up after the entire game server has finished shutting down, and commands are logged via " issued server command: /" but my main question is if any part of Pterodactyl would be able to register that someone put the /restart or /stop command. Thank you! Have a nice day~

P.S.

Log snippet:

[Pterodactyl Daemon] Server marked as OFF
[Pterodactyl Daemon] ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon] Exit Code: 0
[Pterodactyl Daemon] Out of Memory: false
[Pterodactyl Daemon] Error Response:
[Pterodactyl Daemon] Server process detected as entering a crashed state; rebooting.

adminmip avatar Apr 23 '19 03:04 adminmip

The same happens when using /stop

pascal541 avatar Apr 23 '19 07:04 pascal541

Technically /restart in game is not a recognized command. If you are using a plugin it is doing things it shouldn't. The panel sees it as a crash because the application is stopped and it restarts.

Docker container run on a single application process and when that stops it is seen as crashed by the daemon.

parkervcp avatar Apr 23 '19 14:04 parkervcp

The daemon just notices that the server process exited. As there wasn't a stop command issued from the panel, it just assumes the server is supposed to continue running and assumes that it crashed. We could consider taking the exit code into account and maybe not show the crash warning and simply restart the server.

schrej avatar Apr 23 '19 14:04 schrej

We changed it to default off when that happens and there was huge backlash.

as seen here - https://github.com/pterodactyl/panel/issues/1271

The change was reverted.

parkervcp avatar Apr 23 '19 14:04 parkervcp

Modified this a bit to better solve the issue at hand, which would be allowing a server owner to specify if an exit code of 0 should be treated as a crash or not. I suppose we could also make it so exit code of 0 is a normal restart process, rather than falling into the crash detection loop.

When my server stops (and I did not use the panel to stop it):

  • Treat it as crashed
  • Treat it as stopped normally
  • Treat it as restarting (restarts process automatically)

DaneEveritt avatar Apr 27 '19 17:04 DaneEveritt

Also related to https://github.com/pterodactyl/panel/issues/2495

DaneEveritt avatar Mar 28 '22 18:03 DaneEveritt