Server does not shutdown fully, it must be terminated by a SIGTERM
Fastjur opened this issue ยท 5 comments
Hi guys!
I am running server version 0.4.2. I have setup the server to run in a systemd service to execute some commands to shut it down cleanly, but even when just running the run.sh
file, if I issue a stop
command to the server, it does not fully shutdown completely.
This is problematic when running in a systemd service, as I have set up a timeout to SIGTERM
it after 60 seconds, which is plenty to save the most important data, but still it should not hang on shutdown. I have attached full logs and debug logs, but these are the last lines of the logs:
[20May2022 10:26:01.051] [Server thread/INFO] [FTB Chunks/]: Shutting down map thread
[20May2022 10:26:01.052] [Server thread/INFO] [net.creeperhost.ftbbackups.org.quartz.core.QuartzScheduler/]: Scheduler ftbbackups2_$_NON_CLUSTERED shutting down.
[20May2022 10:26:01.052] [Server thread/INFO] [net.creeperhost.ftbbackups.org.quartz.core.QuartzScheduler/]: Scheduler ftbbackups2_$_NON_CLUSTERED paused.
[20May2022 10:26:01.052] [Server thread/INFO] [net.creeperhost.ftbbackups.org.quartz.core.QuartzScheduler/]: Scheduler ftbbackups2_$_NON_CLUSTERED shutdown complete.
[20May2022 10:26:01.056] [Server thread/INFO] [shetiphian.endertanks.EnderTanks/]: Unloading EnderTank Data
[20May2022 10:26:01.056] [Server thread/INFO] [shetiphian.endertanks.EnderTanks/]: Finished Unloading EnderTank Data
[20May2022 10:26:01.056] [Server thread/INFO] [shetiphian.enderchests.EnderChests/]: Unloading EnderChest Data
[20May2022 10:26:01.056] [Server thread/INFO] [shetiphian.enderchests.EnderChests/]: Finished Unloading EnderChest Data
[20May2022 10:26:01.082] [Server thread/INFO] [net.minecraft.server.rcon.thread.GenericThread/]: Thread Query Listener stopped
[20May2022 10:26:59.970] [Server console handler/ERROR] [net.minecraft.server.dedicated.DedicatedServer/]: Caught previously unhandled exception :
java.io.IOError: java.io.IOException: Error executing 'stty -a':
at org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:54) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:650) ~[jline-reader-3.12.1.jar%2312!/:?]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:418) ~[jline-reader-3.12.1.jar%2312!/:?]
at net.minecraftforge.server.console.TerminalHandler.handleCommands(TerminalHandler.java:46) ~[forge-1.18.2-40.1.20-universal.jar%23335!/:?]
at net.minecraft.server.dedicated.DedicatedServer$1.run(DedicatedServer.java:92) ~[server-1.18.2-20220404.173914-srg.jar%23331!/:?]
Caused by: java.io.IOException: Error executing 'stty -a':
at org.jline.utils.ExecHelper.exec(ExecHelper.java:42) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:175) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.terminal.impl.ExecPty.getAttr(ExecPty.java:87) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.terminal.impl.ExecPty.doSetAttr(ExecPty.java:93) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.terminal.impl.AbstractPty.setAttr(AbstractPty.java:29) ~[jline-terminal-3.12.1.jar%2313!/:?]
at org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:52) ~[jline-terminal-3.12.1.jar%2313!/:?]
... 4 more
yeah i think some of us on the discord traced it back to ftbbackups, and it might be this issue here CreeperHost/FTB-Backups-2#9
Ah I see, maybe I'll just disable the backups mod now (if that is a mod) as I have got something myself in place! Thanks :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm not sure this issue should go stale yet.
The linked issue which is the cause, CreeperHost/FTB-Backups-2#9, is merged.
I can't find in this codebase what version of ftbbackups is being used, but if its version 1.0.6 or higher then this issue can be closed. If not, ftbbackups should be bumped to >= 1.0.6