itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.48k stars 1.55k forks source link

Autopause + SneakyServer Mod causes frequent client timeouts #2312

Closed AldsteCarter closed 1 year ago

AldsteCarter commented 1 year ago

Describe the problem

I'm running a docker minecraft server with the autopause feature enabled. There is a mod named Sneaky Server which helps with botting and other such security enhancements. I submitted an issue #9 on the Sneaky Server page and was referred to submit an issue here. The issue with the client timeouts only occurs with the mod enabled; I can remove the mod and leave autopause enabled and clients have no issues. Any insight on this would be much appreciated. Thanks!

Container definition

I do not currently have access to my docker-compose file as I am working remote with no ssh access. I could provide this if absolutely necessary.

Container logs

See related issue.

itzg commented 1 year ago

I don't see how this is anything specific to this image and I have commented as such on the issue you linked. I suggest providing the compose file for them to recreate the problem.

itzg commented 1 year ago

In general it seems like the mod and feature are not compatible. I recommend not using autopause while using that mod.

itzg commented 1 year ago

If you want to debug further, while a player(s) is connected run the following and provide that output:

docker exec <container name> mc-monitor --debug status --show-player-count
adryd325 commented 1 year ago

Oh I see the problem, are you pinging the server, if so its the player list anonymisation that breaks it

You'll have to determine the IP mc-monitor connects from and add it to the permanent allowlist in config/sneakyserver/allowed-ping-ips.csv

a line like 127.0.0.1,0 should work

itzg commented 1 year ago

FWIW here's an example of the ping response it processes:

2023-08-01T17:05:28.277Z    DEBUG   mc-monitor/java_status.go:82    pinging
2023-08-01T17:05:28.278Z    DEBUG   mc-monitor/java_status.go:85    ping returned   {"info": {"version":{"name":"Paper 1.20.1","protocol":763},"players":{"max":20,"online":0,"Sample":null},"description":{"text":"A Paper Minecraft Server powered by Docker","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"","extra":null},"favicon":""}}
0
adryd325 commented 1 year ago

What IP would mc-monitor ping from? if it's just localhost; adding

127.0.0.1,0
0:0:0:0:0:0:0:1%0,0

to config/sneakyserver/allowed-ping-ips.csv should allow pings from the local IP

itzg commented 1 year ago

Yes it'll ping over loopback. The suggested change will be for the OP to configure. The image doesn't include any mod specific configuration.

adryd325 commented 1 year ago

I'll add a default option to allow loopback to ping to prevent issues in the future

itzg commented 1 year ago

@AldsteCarter I'll let you close this out if you're happy with all that.

@adryd325 thanks for your follow-up

AldsteCarter commented 1 year ago

Thanks for the assistance! That makes sense.