Skidamek / AutoModpack

Enjoy a seamless modpack installation process and effortless updates with a user-friendly solution that simplifies management, making your gaming experience a breeze.
https://modrinth.com/mod/automodpack
GNU Lesser General Public License v3.0
91 stars 29 forks source link

Can't restart/stop server #120

Closed 27rogi closed 1 year ago

27rogi commented 1 year ago

Describe the bug Simply the server doesn't stop and hangs, neither by /stop command or control panel.

To Reproduce Steps to reproduce the behavior:

  1. Run server on Pterodactyl CP (possibly works with simple Docker container)
  2. After server is fully loaded try to stop it

Expected behavior Server should stop

Screenshots 2023-06-07_19-17

AutoModpack and Minecraft Version you are using (please complete the following information):

Client & Server log Log

Skidamek commented 1 year ago

Are you sure it is related to automodpack?

27rogi commented 1 year ago

Are you sure it is related to automodpack?

I tried to stop server using built-in command without any other mods except FAPI. Even fully clearing config files didn't work.

Skidamek commented 1 year ago

Server stops completely normally without automodpack?

27rogi commented 1 year ago

Server stops completely normally without automodpack?

Yes, but with it it just hangs up, maybe it's awaiting for host to close itself, but I tried doing /automodpack host stop before using /stop command and still got stuck.

Skidamek commented 1 year ago

Interesting, this has never happened to me, I'll try to investigate it

27rogi commented 1 year ago

Interesting, this has never happened to me, I'll try to investigate it

Tested it locally, seems to be a pretty serious problem because even on Arch Linux with Java 17 and same setup server still hangs up, so this is not a Pterodactyl specific problem. Would be nice to see a fix, otherwise you did a very nice mod 👍🏻

Skidamek commented 1 year ago

Can you try new 3.3.1 release?

27rogi commented 1 year ago

Unfortunately issue is still persistent, literally have no idea what can be causing it (plus I moved server onto 1.20)

Skidamek commented 1 year ago

That's so strange because on my fedora 37 linux server closes without issues as well as on my ubuntu vps... Are you using docker container? If so could you try without?

27rogi commented 1 year ago

Are you using docker container? If so could you try without?

I ran in the same problem with clean-installed Fabric server to personal folder and only added AutoModpack and FAPI, without running it in Docker. On hosting I used Temurin 17 while locally I used Zulu 17.

Running server with these arguments java -Xms128M -Xmx3584M -XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -Dlog4j2.formatMsgNoLookups=true -jar fabric-server-launch.jar

Eatham532 commented 1 year ago

It looks like your server did stop. Because everything saved properly.

I am guessing pterodactyl detects a stopped server when it reads a certain line in console. And that may not be shown when running with the mod.

Does it work without the mod installed?

Skidamek commented 1 year ago

Thanks @Eatham532 you made me thinking, can you @rogi27 please try disabling automodpack host in config before starting the server and then try to stop whole server, to be sure that this is something related to my badly implemented http server?

27rogi commented 1 year ago

It looks like your server did stop. Because everything saved properly.

I am guessing pterodactyl detects a stopped server when it reads a certain line in console. And that may not be shown when running with the mod.

Does it work without the mod installed?

Again, I installed it locally, without ANY other mod, WITHOUT Docker, and still got same problem on clean install.

Eatham532 commented 1 year ago

@rogi27 Can you create a fresh server. Fabric. But don't add any mods. Check to see if you still have the issue.

27rogi commented 1 year ago

@rogi27 Can you create a fresh server. Fabric. But don't add any mods. Check to see if you still have the issue.

What do you think clean/fresh install means?

Eatham532 commented 1 year ago

Oh sorry, didn't read that part of your message :/ Just clarifying, did you try without the mod?

Eatham532 commented 1 year ago

I use a panel called AMP. It has the same issue as you do when running fabric. Because the way it detects a stopped server is when a line of text is written to the console. Normally these panels are not built specifically for modded clients so there are always problems.

Skidamek commented 1 year ago

Thanks @Eatham532 you made me thinking, can you @rogi27 please try disabling automodpack host in config before starting the server and then try to stop whole server, to be sure that this is something related to my badly implemented http server?

Could you try?

27rogi commented 1 year ago

Thanks @Eatham532 you made me thinking, can you @rogi27 please try disabling automodpack host in config before starting the server and then try to stop whole server, to be sure that this is something related to my badly implemented http server?

Could you try?

I will try.

littlewing1977 commented 1 year ago

I'm having the same issue. I'm running this mod on Minecraft 1.20.1 in an AMP instance that is running on Ubuntu. I can't shutdown or restart. It just hangs. The server is set to sleep when nobody is on it also. It hangs when trying to sleep also. So every time I want to log in, I have to force kill Minecraft server, then start it again.

Skidamek commented 1 year ago

Interesting, could you try to disable modpack host in config and check if the same problem also accurees?

littlewing1977 commented 1 year ago

I did some testing this morning.

I removed AutoModpack. The server shuts down as expected. I then reinstalled AutoModpack. With no changes to configuration, the server fails to complete the shutdown. I ran the command /Automodpack host stop. The server still fails to shut down. I edited the server config file and set modpackHost to false. The server fails to shut down.

I noticed the output to the console is exactly the same in every scenario. See below. After “All dimensions are saved,” the server still says it’s shutting down and I have to force kill it. When the mod is NOT installed, it completes the shut down immediately after that line.

I think I covered everything. Let me know if you want me to try anything else. Can we confirm that the HTTP server has completely stopped? Could that be holding it up?

Server thread/INFO

10:52:18

Stopping the server

Stopped modpack hosting

Stopping server

Saving players

Saving worlds

10:52:19

Saving chunks for level 'ServerLevel[world]'/minecraft:overworld

Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether

Saving chunks for level 'ServerLevel[world]'/minecraft:the_end

ThreadedAnvilChunkStorage (world): All chunks are saved

ThreadedAnvilChunkStorage (DIM-1): All chunks are saved

ThreadedAnvilChunkStorage (DIM1): All chunks are saved

ThreadedAnvilChunkStorage: All dimensions are saved

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: Wednesday, June 14, 2023 10:22 PM To: @.> Cc: @.>; @.> Subject: Re: [Skidamek/AutoModpack] Can't restart/stop server (Issue #120)

Interesting, could you try to disable modpack host in config and check if the same problem also accurees?

— Reply to this email directly, view it on GitHubhttps://github.com/Skidamek/AutoModpack/issues/120#issuecomment-1592241824, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABNVCVNXC56NWRB6VOT3GNTXLJWXJANCNFSM6AAAAAAY6D46EA. You are receiving this because you commented.Message ID: @.***>

Skidamek commented 1 year ago

oh right, thank you i get it reproduced

suerion commented 1 year ago

I think i had the same issue on Windows xD but don't get it as Bug. I closed allways the batch command, could be the same problem, and i think about it, because the bug was here on Linux docker. there it was more seen as a problem as on windows

Skidamek commented 1 year ago

Nah, that's a really issue, get it reproduced on bash without any panels, dockers, etc... no clue what could cause this yet...

MikolajMNK19 commented 1 year ago

I've got the same issue on windows

MikolajMNK19 commented 1 year ago

Update: just moved my newly configured server to linux and the issue persists

Skidamek commented 1 year ago

Fixed in 3.3.6