Replies: 2 comments
-
Fantastic research and write-up. That sounds like a great solution. If you would like to contribute an example in the repo's https://github.com/itzg/docker-minecraft-bedrock-server/tree/master/examples directory then that would be great too. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@itzg I created a PR #554, please take a look! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
When running Bedrock Minecraft Server in Kubernetes with Tailscale operator for VPN access, iOS clients (iPhone/iPad) fail to connect while Windows clients work normally. iOS clients get stuck at "Locating server" phase after initial authentication.
Environment
tailscale.com/expose: "true"
annotationClient versions:
Root Cause Analysis
Network Path
Findings from tcpdump investigation
ICMP Fragmentation Needed messages: At the second kube-proxy hop, I observed ICMP Type 3 Code 4 (Fragmentation Needed and DF Set) responses, indicating packets with DF flag couldn't be fragmented.
Server behavior: The Bedrock server kept retransmitting the same packets repeatedly when receiving these ICMP messages.
Platform differences:
Deep Dive into RakNet Protocol and MTU Negotiation
Based on our investigation, I believe the following is happening:
RakNet MTU Discovery: The RakNet protocol (used by Bedrock) has a built-in MTU discovery mechanism during connection initialization. Clients communicate their MTU capabilities to the server.
Platform MTU handling differences:
Server adaptation behavior:
Control experiment:
Hypothesis
The Bedrock server appears to have two modes of operation:
iOS clients through Tailscale cannot properly communicate their effective MTU due to iOS platform limitations, causing the connection to fail during the "Locating server" phase.
Solution
Add an initContainer to explicitly set the MTU on the pod's default route:
The MTU value of 1280 was chosen to match the Tailscale gateway pod's adapter MTU.
Impact
This workaround successfully allows iOS clients to connect through Tailscale VPN while maintaining compatibility with other clients.
Why Posting Here
Since this repository includes Kubernetes YAML examples, others using similar setups might encounter the same issue. This information could save someone hours of debugging when combining this image with VPN overlays like Tailscale.
Questions for the Community
If anyone has encountered similar issues or knows a more elegant solution than the initContainer workaround, I'd love to hear about it!
References
Acknowledgment
Finally, I want to thank you for maintaining this excellent Docker image! Thanks to your work, my family can enjoy playing Minecraft together with minimal maintenance effort. This project has been invaluable for our home server setup. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions