mojira.dev
MC-154617

Server hangs on stop due to rcon

Simply put when you attempt to stop a server using the /stop command the server fails to shut down if an rcon client is connected. The log file shows the following exception as a result:

[15:20:21] [Server thread/WARN]: Thread yg@1cb3537d (RUNNABLE) failed to exit after 2 second(s)
[15:20:21] [Server thread/WARN]: Stack:
[15:20:21] [Server thread/WARN]: java.net.SocketInputStream.socketRead0(Native Method)
[15:20:21] [Server thread/WARN]: java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
[15:20:21] [Server thread/WARN]: java.net.SocketInputStream.read(SocketInputStream.java:171)
[15:20:21] [Server thread/WARN]: java.net.SocketInputStream.read(SocketInputStream.java:141)
[15:20:21] [Server thread/WARN]: java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
[15:20:21] [Server thread/WARN]: java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
[15:20:21] [Server thread/WARN]: java.io.BufferedInputStream.read(BufferedInputStream.java:345)
[15:20:21] [Server thread/WARN]: yg.run(SourceFile:46)
[15:20:21] [Server thread/WARN]: java.lang.Thread.run(Thread.java:748)

 

I found this out when the server successfully shut down the moment I shut my rcon client down.

Linked issues

Comments 18

This sounds a lot like MC-72390, which has been fixed in 1.14.3-pre2. Please check whether the issue persists in the latest pre-release (currently 1.14.3-pre3, make sure to backup your world!)

This sounds a lot like MC-72390, which has been fixed in 1.14.3-pre2. Please check whether the issue persists in the latest pre-release (currently 1.14.3-pre3, make sure to backup your world!)

Not convinced as it's still occurring in 1.14.3. Nice and easy to replicate too.

Not convinced as it's still occurring in 1.14.3. Nice and easy to replicate too.

Bug confirmed in 1.14.4

Use case:

  • Running server in loop in batch file (so it will restart when stopped)

  • scheduled function to stop ( /stop command ) server after x hours (auto restart server for performance)

  • Using [VanillaVotifier|https://github.com/xMamo/VanillaVotifier] to handle votes, VanillaVotifier connect through rcon when someone votes through a website, it keeps it's rcon connection open to be able to reuse is for another vote.

So in this case, if someone has voted the server will hang on it's next restart.

Tested with [Tiiffi/mcrcon|https://github.com/Tiiffi/mcrcon]:

mcrcon.exe -t -p password -H localhost -P 25576
Logged in. Type "Q" to quit!
> list
There are 0 of a max 100 players online:
> stop
Stopping the server
> _

 

Log results:

[10:28:56] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[10:28:56] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[10:28:56] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[10:28:56] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[10:28:56] [Server thread/INFO]: Starting minecraft server version 1.14.4
[10:28:56] [Server thread/INFO]: Loading properties
[10:28:56] [Server thread/INFO]: Default game type: SURVIVAL
[10:28:56] [Server thread/INFO]: Generating keypair
[10:28:56] [Server thread/INFO]: Starting Minecraft server on *:25566
[10:28:56] [Server thread/INFO]: Using default channel type
[10:28:56] [Server thread/INFO]: Preparing level "world"
[10:28:56] [Server thread/INFO]: Reloading ResourceManager: Default, cleanmc
[10:28:57] [Server thread/INFO]: Loaded 6 recipes
[10:28:57] [Server thread/INFO]: Loaded 39 custom command functions
[10:28:57] [Server thread/INFO]: Loaded 811 advancements
[10:28:57] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[10:28:58] [Server thread/INFO]: Preparing spawn area: 0%
[10:28:58] [Server thread/INFO]: Preparing spawn area: 0%
[10:28:59] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[10:28:59] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[10:28:59] [Server thread/INFO]: Preparing spawn area: 89%
[10:29:01] [Server-Worker-4/INFO]: Preparing spawn area: 91%
[10:29:01] [Server-Worker-4/INFO]: Preparing spawn area: 91%
[10:29:01] [Server-Worker-7/INFO]: Preparing spawn area: 91%
[10:29:01] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[10:29:02] [Server thread/INFO]: Time elapsed: 4413 ms
[10:29:02] [Server thread/INFO]: Done (5.721s)! For help, type "help"
[10:29:02] [Server thread/INFO]: Starting remote control listener
[10:29:02] [RCON Listener #1/INFO]: RCON running on 0.0.0.0:25576
[10:32:22] [RCON Listener #1/INFO]: Rcon connection from: /0:0:0:0:0:0:0:1
[10:33:01] [Server thread/INFO]: [Rcon: Stopping the server]
[10:33:01] [Server thread/INFO]: Stopping server
[10:33:01] [Server thread/INFO]: Saving players
[10:33:01] [Server thread/INFO]: Saving worlds
[10:33:01] [Server thread/INFO]: Saving chunks for level 'world'/minecraft:the_nether
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10:33:01] [Server thread/INFO]: Saving chunks for level 'world'/minecraft:the_end
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10:33:01] [Server thread/INFO]: Saving chunks for level 'world'/minecraft:overworld
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10:33:01] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[10:33:03] [Server thread/WARN]: Thread yl@123df3d (RUNNABLE) failed to exit after 1 second(s)
[10:33:03] [Server thread/WARN]: Stack:
[10:33:03] [Server thread/WARN]: java.net.SocketInputStream.socketRead0(Native Method)
[10:33:03] [Server thread/WARN]: java.net.SocketInputStream.socketRead(Unknown Source)
[10:33:03] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:03] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:03] [Server thread/WARN]: java.io.BufferedInputStream.fill(Unknown Source)
[10:33:03] [Server thread/WARN]: java.io.BufferedInputStream.read1(Unknown Source)
[10:33:03] [Server thread/WARN]: java.io.BufferedInputStream.read(Unknown Source)
[10:33:03] [Server thread/WARN]: yl.run(SourceFile:46)
[10:33:03] [Server thread/WARN]: java.lang.Thread.run(Unknown Source)
[10:33:04] [Server thread/WARN]: Thread yl@123df3d (RUNNABLE) failed to exit after 2 second(s)
[10:33:04] [Server thread/WARN]: Stack:
[10:33:04] [Server thread/WARN]: java.net.SocketInputStream.socketRead0(Native Method)
[10:33:04] [Server thread/WARN]: java.net.SocketInputStream.socketRead(Unknown Source)
[10:33:04] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:04] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:04] [Server thread/WARN]: java.io.BufferedInputStream.fill(Unknown Source)
[10:33:04] [Server thread/WARN]: java.io.BufferedInputStream.read1(Unknown Source)
[10:33:04] [Server thread/WARN]: java.io.BufferedInputStream.read(Unknown Source)
[10:33:04] [Server thread/WARN]: yl.run(SourceFile:46)
[10:33:04] [Server thread/WARN]: java.lang.Thread.run(Unknown Source)
[10:33:05] [Server thread/WARN]: Thread yl@123df3d (RUNNABLE) failed to exit after 3 second(s)
[10:33:05] [Server thread/WARN]: Stack:
[10:33:05] [Server thread/WARN]: java.net.SocketInputStream.socketRead0(Native Method)
[10:33:05] [Server thread/WARN]: java.net.SocketInputStream.socketRead(Unknown Source)
[10:33:05] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:05] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:05] [Server thread/WARN]: java.io.BufferedInputStream.fill(Unknown Source)
[10:33:05] [Server thread/WARN]: java.io.BufferedInputStream.read1(Unknown Source)
[10:33:05] [Server thread/WARN]: java.io.BufferedInputStream.read(Unknown Source)
[10:33:05] [Server thread/WARN]: yl.run(SourceFile:46)
[10:33:05] [Server thread/WARN]: java.lang.Thread.run(Unknown Source)
[10:33:06] [Server thread/WARN]: Thread yl@123df3d (RUNNABLE) failed to exit after 4 second(s)
[10:33:06] [Server thread/WARN]: Stack:
[10:33:06] [Server thread/WARN]: java.net.SocketInputStream.socketRead0(Native Method)
[10:33:06] [Server thread/WARN]: java.net.SocketInputStream.socketRead(Unknown Source)
[10:33:06] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:06] [Server thread/WARN]: java.net.SocketInputStream.read(Unknown Source)
[10:33:06] [Server thread/WARN]: java.io.BufferedInputStream.fill(Unknown Source)
[10:33:06] [Server thread/WARN]: java.io.BufferedInputStream.read1(Unknown Source)
[10:33:06] [Server thread/WARN]: java.io.BufferedInputStream.read(Unknown Source)
[10:33:06] [Server thread/WARN]: yl.run(SourceFile:46)
[10:33:06] [Server thread/WARN]: java.lang.Thread.run(Unknown Source)
[10:33:07] [Server thread/WARN]: Waited 5 seconds attempting force stop!
[10:33:08] [Server thread/WARN]: Waited 6 seconds attempting force stop!
[10:33:09] [Server thread/WARN]: Waited 7 seconds attempting force stop!
[10:33:10] [Server thread/WARN]: Waited 8 seconds attempting force stop!
[10:33:11] [Server thread/WARN]: Waited 9 seconds attempting force stop!
[10:33:12] [Server thread/WARN]: Waited 10 seconds attempting force stop!
[10:33:13] [Server thread/WARN]: Waited 11 seconds attempting force stop!
[10:33:14] [Server thread/WARN]: Waited 12 seconds attempting force stop!
[10:33:15] [Server thread/WARN]: Waited 13 seconds attempting force stop!
[10:33:16] [Server thread/WARN]: Waited 14 seconds attempting force stop!
[10:33:17] [Server thread/WARN]: Waited 15 seconds attempting force stop!

8 more comments

Still present in 1.15.1 as well.

@unknown, as the reporter of this ticket, you can add affected versions yourself.

@unknown, as the reporter of this ticket, you can add affected versions yourself.

Does this issue exist on spigotMC 1.15.2, or is this the wrong place to ask.

Does this issue exist on spigotMC 1.15.2, or is this the wrong place to ask.

Matthew Beeching

boq

Community Consensus

(Unassigned)

Minecraft 1.14.2, 1.14.4, 1.15.1, 1.15.2

20w16a

Retrieved