docker-minecraft-server
docker-minecraft-server copied to clipboard
Autopause & playitgg: not resuming when trying to connect via playitgg
Describe the problem
I'm using the autopause feature:
ENABLE_AUTOPAUSE="true"
AUTOPAUSE_TIMEOUT_EST="900"
AUTOPAUSE_TIMEOUT_INIT="300"
Players can connect via playit.gg just fine, but if the server got paused knockd does not seem to notice connection attempts. Connection attempts from my local network are able to wake up the server just fine.
I'm not sure if the issue is with the knockd config or with how playit.gg does things. Any ideas how I could investigate would be great.
Container definition
No response
Container logs
Auto-pause and knockd was a contributed feature so I can't offer much advice myself. All of the logic is in
https://github.com/itzg/docker-minecraft-server/blob/master/files/auto/autopause-daemon.sh
My only suggestion is to consider different values for AUTOPAUSE_KNOCK_INTERFACE.
I've tried setting AUTOPAUSE_KNOCK_INTERFACE to lo as this is the only other interface and from what I could find the playit.gg agent forwards requests to 127.0.0.1.
I've used a patched image that adds --include-loopback to the mc-image-helper network-interfaces calls in files/auto/autopause-daemon.sh: Patch
diff --git a/files/auto/autopause-daemon.sh b/files/auto/autopause-daemon.sh
index 6bb0233..b614abd 100644
--- a/files/auto/autopause-daemon.sh
+++ b/files/auto/autopause-daemon.sh
@@ -10,7 +10,7 @@ fi
autopause_error_loop() {
logAutopause "Available interfaces within the docker container:"
- logAutopause " $(mc-image-helper network-interfaces)"
+ logAutopause " $(mc-image-helper network-interfaces --include-loopback)"
logAutopause "Please set the environment variable AUTOPAUSE_KNOCK_INTERFACE to the interface that handles incoming connections."
logAutopause "If unsure which interface to choose, run the ifconfig command in the container."
logAutopause "Autopause failed to initialize. This log entry will be printed every 30 minutes."
@@ -35,7 +35,7 @@ if [[ -z "$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then
logAutopause "AUTOPAUSE_KNOCK_INTERFACE variable must not be empty!"
autopause_error_loop
fi
-if ! mc-image-helper network-interfaces --check="$AUTOPAUSE_KNOCK_INTERFACE" ; then
+if ! mc-image-helper network-interfaces --include-loopback --check="$AUTOPAUSE_KNOCK_INTERFACE" ; then
logAutopause "Selected interface \"$AUTOPAUSE_KNOCK_INTERFACE\" does not exist!"
autopause_error_loop
fi
This fixed the issue I had, but now I can only knock the server via playit.gg 😅
Do you think it would make sense to allow passing multiple interfaces to AUTOPAUSE_KNOCK_INTERFACE and start one daemon per interface or do you want to deprecate the autopause feature anyway because of the "new" pause-when-empty-seconds server property.
Great research.
I would really like to deprecate this image's auto pause support in favor of the new native capability of Minecraft itself...however users of older Minecraft versions won't get that benefit.
So, perhaps both options are good.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.
@itzg how do you deal with such issues? Should we (re)open it until someone has the time to implement it? 🤔
It would have been best if you commented before the bot closed it.
And I'll convert to a discussion since there's nothing this I image can do to fix this.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.