AMP
AMP copied to clipboard
Minecraft Fabric server hangs on Stop/Restart
Bug Report
System Information
- Operating System (Including distribution name and version number)
- Microsoft Windows Server 2012 R2 Standard; Version 6.3.9600 Build 9600
- AMP version and build date (Always use the version number, 'latest' is not valid!)
- AMP 2.2.0.2
- Which AMP release stream you're using (Mainline, Nightly or FastTrack)
- Mainline
I confirm:
- [x] that I have searched for an existing bug report for this issue.
- [x] that I am using the latest available version of AMP.
- [x] that my operating system is up-to-date.
Symptoms
- What are you trying to do?
- Restart the Minecraft server automatically on a schedule
- What are you expecting to happen?
- The server to stop, then restart
- What is actually happening? ('Nothing' is not an acceptable answer!)
- The server will stop, but AMP never actualy registers the server stopping. it just displays an endless "Stopping Server" notification until it is "Killed" and then manually restarted
Reproduction
I'm not entierly sure how to reproduce this reliably. I deleted the instance, uninstalled AMP completly, Rebooted, Reinstalled AMP, Created a new ADS instance, Rebooted again, and then re-created the Minecraft instance. The issue persists. The server is a Minecraft Mobpack based on Fabric called All of Fabric 3 I have a seperate Instance running a "Vanilla" minecraft server that's also based on Fabric (just with Plugins, no Mods) which stops and restarts without issues.
I have the same issue with a server running All of Fabric 4 (version 0.0.8).
I have another server running a FTB pack and that one is running without problems. I am currently running on a Ubuntu Server 20.04 so this seems to be an OS independent issue.
I think it was working without issue in either 2.1.2.0 or 2.2.0.0.
My issue is with sleep mode mainly for this server, but I figured I could just run it and have it automatically restart. But this fails with the same issue of AMP not registering that the server has stopped.
I've noticed that when the server is "stopped" or "restarted", the Java process doesn't actually appear to exit (which must be how AMP determines if the server has stopped?)
For now i've had to modify the schedule in AMP to stop the server, and then start it a minute later and use task scheduler to run a short script i wrote in powershell to find the Java instance spawned by the relevant AMP instance and kill it during that minute window if it hasn't exited on its own.
It may be that a mod in the "All of Fabric" pack is causing the Java instance to hang instead of terminate, but i'm not sure how i'd go about investigating that...
I've had this issue for years with certain modpacks - some just fail to exit cleanly at all, even when run outside of AMP. It's not really an AMP issue, although Mike could sort this with a force kill after 30/60 secs as an option.
This is still an issue with fabric-server-mc.1.19.2-loader.0.14.9-launcher.0.11.1
lol... that's an old issue 😸 @VoidFyre as the last two comments mentioned, it's not an issue with AMP. Some mods causing the server to not stop entirely. You need to figure out which mod causes this and contact the mod developer or just remove the mod. I remember there was some talking about killing the process if it doesn't stop after some time, but I can't remember if there was something implemented or not. Maybe that's why this issue is still open, but it would need a feature request imho
I have this issue with ATM8 mod pack. I hit stop, and it saves the server and whatnot, then the last line in the console is "Thread Query Listener Stopped"
The Java process never closes so the server will never stop/restart
I am also experiencing this issue. I am working on a cronjob task to check the current AMP log and kill the process if it's been stuck on "stopping" for long enough, but I would greatly appreciate a "kill process if it takes more than X minutes" option instead.
I'm also experiencing this issue. My server also hangs on "Thread Query Listener Stopped" like @frappim's. Has anyone found or developed a way to perhaps force kill the server after a certain period of time? I'm trying to utilize mcemptyserverstopper in conjunction with mcsleepingserverstarter but of course the latter cannot "rouse" the server if it hasn't properly stopped, and the best the former can do is repeatedly send the "No players online -> stopping server" message endlessly.
There's still no fix? Experiencing this issue with 1.20.4
AMP will kill the process if it hangs for too long after receiving the server stop message (assuming you're up to date with your instillation). With Fabric it's because they wait until all background threads have been stopped, and in some cases they just hang indefinitely, so the server never fully stops properly. (either due to some internal Minecraft process or some mod not stopping it's threads properly)