Open VindicoRory opened 3 years ago
Did you try to stop your server manually using stop
command to see if it will throw same error?
Did you try to stop your server manually using
stop
command to see if it will throw same error?
No error when stopping the server manually, both in game and via console
Do you have RCON enabled?
Yep, RCON is enabled
Did you try to manually send stop
command via RCON? Lazymc should shutdown server using RCON only, if it's enabled and configured properly.
References: https://github.com/timvisee/lazymc/blob/master/src/server.rs#L211-L221 https://github.com/timvisee/lazymc/blob/master/src/server.rs#L405-L407
You can use https://pypi.org/project/mcrcon/ to test RCON.
That's weird! Judging by
[19:39:57 WARN]: Unexpected exception while parsing console command ""
it looks like it doesn't receive any RCON command. It should receive stop
. I didn't come across this during development.
Sadly I haven't found an alternative method to gracefully stop a server (programmatically) on Windows yet. For example, on non-Windows platforms it falls back to an alternative stopping method if RCON fails.
I'll give it a spin as well with that Spigot version to see if I get the same issue.
im just worried about crashing the server not saving chunks or player data correctly.
Yes, errors like this will eventually corrupt your server data.
Do you have RCON enabled?
lazymc
should automatically enable and configure it on start (while advanced.rewrite_server_properties
is true
).
[19:39:57 WARN]: Unexpected exception while parsing console command ""
Just having tested this, I cannot reproduce this.
I used this JAR on an empty server.
java.lang.IllegalStateException: Asynchronous command dispatch! at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[patched_1.16.5.jar:git-Paper-790] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:801) ~[patched_1.16.5.jar:git-Paper-790] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:788) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.DedicatedServer.lambda$executeRemoteCommand$3(DedicatedServer.java:733) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.lambda$executeFuture$0(IAsyncTaskHandler.java:48) ~[patched_1.16.5.jar:git-Paper-790] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.execute(IAsyncTaskHandler.java:89) ~[patched_1.16.5.jar:git-Paper-790] at java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1778) ~[?:?] at java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:2001) ~[?:?] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeFuture(IAsyncTaskHandler.java:47) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeSync(IAsyncTaskHandler.java:64) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.DedicatedServer.executeRemoteCommand(DedicatedServer.java:712) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.RemoteControlSession.run(SourceFile:81) ~[patched_1.16.5.jar:git-Paper-790]
This looks like a thread-safety bug in Paper or even Minecraft itself. It may be wise to open a bug report there.
Another datapoint - I'm seeing the same thing while running paper-1.21.1-57
on Debian trixie using lazymc v0.2.11
Logs:
INFO lazymc::monitor > Server has been idle, sleeping...
[00:33:21 INFO]: Thread RCON Client /127.0.0.1 started
[00:33:21 INFO]: [Rcon: Stopping the server]
[00:33:21 WARN]: Unexpected exception while parsing console command ""
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1014) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1004) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:985) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.dedicated.DedicatedServer.lambda$runCommand$4(DedicatedServer.java:817) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:60) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1537) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1514) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1507) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1466) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1473) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1318) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.1.jar:1.21.1-57-b483da4]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[00:33:21 INFO]: Stopping server
[00:33:21 INFO]: Thread RCON Client /127.0.0.1 shutting down
INFO lazymc::monitor > Server is now sleeping
I've enabled the RCON option and left the configuration at the default so it rewrites the server.properties
when it starts with a known RCON port and random password.
Works great on startup, but on shutdown it produces 2 errors.
[19:39:57 WARN]: Unexpected exception while parsing console command ""
andjava.lang.IllegalStateException: Asynchronous command dispatch! at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[patched_1.16.5.jar:git-Paper-790] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:801) ~[patched_1.16.5.jar:git-Paper-790] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:788) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.DedicatedServer.lambda$executeRemoteCommand$3(DedicatedServer.java:733) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.lambda$executeFuture$0(IAsyncTaskHandler.java:48) ~[patched_1.16.5.jar:git-Paper-790] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.execute(IAsyncTaskHandler.java:89) ~[patched_1.16.5.jar:git-Paper-790] at java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1778) ~[?:?] at java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:2001) ~[?:?] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeFuture(IAsyncTaskHandler.java:47) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeSync(IAsyncTaskHandler.java:64) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.DedicatedServer.executeRemoteCommand(DedicatedServer.java:712) ~[patched_1.16.5.jar:git-Paper-790] at net.minecraft.server.v1_16_R3.RemoteControlSession.run(SourceFile:81) ~[patched_1.16.5.jar:git-Paper-790]
Im not sure if this is a paper only issue, im just worried about crashing the server not saving chunks or player data correctly.
This happens every shutdown. Version:
Paper 1.16.5
Plugins:None
Platform:Windows 10