Closed eydrien-dev closed 5 months ago
Further testing I realized the problem only occurs when there's players online. When you do it with no one online it basically execute the command completely and the server restarts. So the problem have to be with users.
It doesn't seem to be a problem with DMCC.
Even when the server is completely clean (only restart-server and its dependencies are installed), it still cannot restart normally and crashes.
[17:07:17] [Server thread/INFO]: Xujiayao[/127.0.0.1:2857] logged in with entity id 294 at (-13.0, 64.0, -340.0)
[17:07:17] [Server thread/INFO]: Xujiayao joined the game
restart
[17:07:23] [Server thread/INFO]: [Restart Server] Restarting server...
[17:07:23] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoSuchMethodError: 'void net.minecraft.class_3244.method_14367(net.minecraft.class_2561)'
at io.github.steveplays28.restartserver.commands.RestartCommand.lambda$execute$2(RestartCommand.java:28) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at io.github.steveplays28.restartserver.commands.RestartCommand.execute(RestartCommand.java:28) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
at io.github.steveplays28.restartserver.commands.RestartCommand.lambda$register$0(RestartCommand.java:20) ~[restart-server-1.2.0+mc1.19.x-1.20.x.jar:?]
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
at net.minecraft.class_8865.method_54416(class_8865.java:29) ~[server-intermediary.jar:?]
at net.minecraft.class_8865.execute(class_8865.java:13) ~[server-intermediary.jar:?]
at net.minecraft.class_8856.method_54405(class_8856.java:8) ~[server-intermediary.jar:?]
at net.minecraft.class_8847.method_54388(class_8847.java:8) ~[server-intermediary.jar:?]
at net.minecraft.class_8854.method_54390(class_8854.java:107) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_54313(class_2170.java:378) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_9249(class_2170.java:308) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_44252(class_2170.java:298) ~[server-intermediary.jar:?]
at net.minecraft.class_3176.method_13941(class_3176.java:299) ~[server-intermediary.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:284) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:845) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:683) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
[17:07:24] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Xujiayao\Desktop\Server\.\crash-reports\crash-2024-03-22_17.07.24-server.txt
[17:07:24] [Server thread/INFO]: Stopping server
[17:07:24] [Server thread/INFO]: Saving players
[17:07:24] [Server thread/INFO]: Xujiayao lost connection: Server closed
[17:07:24] [Server thread/INFO]: Xujiayao left the game
[17:07:24] [Server thread/INFO]: Saving worlds
[17:07:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[新的世界]'/minecraft:overworld
[17:07:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[新的世界]'/minecraft:the_nether
[17:07:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[新的世界]'/minecraft:the_end
[17:07:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[17:07:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[17:07:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[17:07:24] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
It works for me when doing it ingame or in the console, it just doesn't work when doing it through discord when players are online.
What game version are you?
fabric 1.20.1
Lemme try that
this is how I have my config to make it work through screen.
Boom... That restart-server mod is incompatible with 1.20.4. (@Steveplays28)
And the restart function still works perfectly in 1.20.1 with player in the server
(Discord command: /console restart
)
I am using completely default settings.
Then I don't know what could it be that is causing me to not work when players are online through discord console command. Could it be for having stuff messing with nicknames? Like my minecraft name is _Eydrien_,
but I'm using StyledChat & StyledNicknames for formatting and also luckperms for prefixes.
Could you send me your server zip for testing? The world folder is not needed. You may obscure the token if you feel it necessary.
You may send it via my email: i#xujiayao.com
Thanks for the heads up. Had no clue it was incompatible with 1.20.4.
I'll investigate. In the meantime, I can recommend alternatives such as hosting with Docker + Portainer, setting an auto-restart mode, and simply running /stop
(as I mentioned to eydrien in my Discord server as well).
Oops, sorry. I didn't know you two had been in touch 😂
All good!
Closing due to not being able to reproduce.
Checks
Description
So i have a custom command created by this mod (https://modrinth.com/mod/restart-server). Basically restarts the servers; I have it edited so it works with screen on linux, so basically when I hit restart, server closes, delete the current screen and creates a new one with the new instance of the starting process working.
When I try to execute this command through "/console restart" on my discord channel using this mod, my minecraft character exits the game as if the game is closing as normal, but the game doesn't really close.
and it shows this error after doing so. (server is still up and I can join back, it just that it doesn't restart at all) edit: https://mclo.gs/An6qAmo for better formatting.
If I do it normally just using the command /restart ingame it works perfectly, so I'm not really sure what could be the problem here. Any ideas or solutions?