Server doesn't always save world on SIGTERM
Sending SIGTERM to minecraft server doesn't always properly shutdown.
Sometimes when I send SIGTERM it appears to shutdown properly like so.
2013-06-04 00:37:53 [INFO] Closing listening thread
2013-06-04 00:37:53 [INFO] Saving players
2013-06-04 00:37:53 [INFO] Saving worlds
2013-06-04 00:37:53 [INFO] Saving chunks for level 'world'/Overworld
Other times I only see
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
at if.run(SourceFile:61)
So I am unaware if the world was properly saved in these cases.
It would also be nice if other common signals were supported, for example HUP and SIGUSR2.
Environment
debian linux, java version 1.7. I have tested with both openjdk and oracle.
Linked Issues
duplicates1
Created Issue:
Server doesn't always save world on SIGTERM
Sending SIGTERM to minecraft server doesn't always properly shutdown.
Sometimes when I send SIGTERM it appears to shutdown properly like so.
2013-06-04 00:37:53 [INFO] Closing listening thread
2013-06-04 00:37:53 [INFO] Saving players
2013-06-04 00:37:53 [INFO] Saving worlds
2013-06-04 00:37:53 [INFO] Saving chunks for level 'world'/OverworldOther times I only see
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
at if.run(SourceFile:61)So I am unaware if the world was properly saved in these cases.
It would also be nice if other common signals were supported, for example HUP and SIGUSR2.
Environment
debian linux, java version 1.7. I have tested with both openjdk and oracle.
duplicates
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
No response in 4 months, assuming no longer an issue.
This is still a issue.
I can reproduce on 1.15.2. Sometimes it saves, sometimes it doesn't.
test 1:
[15:10:39] [Server thread/INFO]: Done (12.680s)! For help, type "help" [15:10:54] [Server thread/INFO]: Stopping server [15:10:54] [Server thread/INFO]: Saving playerstest 2:
[15:11:21] [Server thread/INFO]: Done (13.268s)! For help, type "help"test 3:
[15:13:34] [Server thread/INFO]: Done (13.168s)! For help, type "help"In that case, please create a new ticket. This one has been resolved since about 7 years.