panel
panel copied to clipboard
Make crash detection configurable on a per-server basis.
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 "
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.
The same happens when using /stop
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.
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.
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.
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)
Also related to https://github.com/pterodactyl/panel/issues/2495