Sleep Mode doesn't work properly (Minecraft Forge)

OS Name/Version: Ubuntu 20.04.4

Product Name/Version: 2.4.0.10

Jave Version: TEMURIN 17

Minecraft Version: Forge 40.1.61 (1.18.2) / (Modpack: Vault Hunters 3rd edition)

Problem Description:

I have a Problem with the sleep Funktion for Minecraft. Everytime the server tries to go to sleep it works, but the server can’t be woken up again (Not via the Interface nor by joining).
It always states in the Interface “Application State: Preparing to sleep”. I need to stop the ehole instance to make it running again.

Is there a way to fix this problem?

I have currently deactivated automatic sleep and shut the Server down when i dont play.

Server log at Sleep:

Server thread/INFO14:39:30
Stopping the server
Stopping server
Saving players
Saving worlds
Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
Saving chunks for level 'ServerLevel[world]'/the_vault:vault
Saving chunks for level 'ServerLevel[world]'/the_vault:the_other_side
Saving chunks for level 'ServerLevel[world]'/ae2:spatial_storage
Saving chunks for level 'ServerLevel[world]'/the_vault:arena
Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
ThreadedAnvilChunkStorage (world): All chunks are saved
ThreadedAnvilChunkStorage (DIM1): All chunks are saved
ThreadedAnvilChunkStorage (vault): All chunks are saved
ThreadedAnvilChunkStorage (the_other_side): All chunks are saved
ThreadedAnvilChunkStorage (spatial_storage): All chunks are saved
ThreadedAnvilChunkStorage (arena): All chunks are saved
ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
ThreadedAnvilChunkStorage: All dimensions are saved
Scheduler ftbbackups2_$_NON_CLUSTERED shutting down.
Scheduler ftbbackups2_$_NON_CLUSTERED paused.
Scheduler ftbbackups2_$_NON_CLUSTERED shutdown complete.

What happens, if you stop the minecraft server from a running state? I assume AMP won’t detect it to be stopped. AMP waits for the process to stop, and sometimes there are mods that keep the process alive, causing the server to never stop fully. That’s not an issue with AMP. It would be the same outside of AMP. You would need to identify the mod causing this problem and contact the mod developer about it.

But in general advice, sleep mode and non-vanilla minecraft doesn’t work always very well. It’s an either it works or not.

Stopping from a running state works perfectly. I get the same server logs like the sleep.

Sleep mode is only officially supported on servers that can be connected to with an unmodified client. Anything else is YMMV.

An Forge Update Fixed the Issue.