docker-minecraft-bedrock-server
docker-minecraft-bedrock-server copied to clipboard
Docker desktop for Mac, had to forward both TCP and UDP 19132 to container
I am running Docker desktop on macOS. In order to connect (on my LAN) to the bedrock server from my iPhone on port 19132 I had to forward both UDP and TCP. Is this normal?
docker run -d --name=mc -e GAMEMODE=creative -e DIFFICULTY=peaceful -e EULA=TRUE -p 19132:19132/udp -p 19132:19132 -v /Users/davidmcgough/mc:/data itzg/minecraft-bedrock-server
if I exclude either -p argument I cannot connect. I am raising this issue because I don't see any mention of forwarding the TCP port in the directions.
Thanks.
I thought it should only be necessary to map the UDP port since that is what has worked for me; however, it sounds like mapping both definitely improved your setup. I’ll have to keep this in mind as a possible solution.
So far the UDP only mapping has worked both with Docker Desktop on Windows and regular Docker on Ubuntu. I’ll have to give it a try on Mac to see if that’s the difference.
also had to do this
I finally remembered to try this on my Mac and I see what you mean. What's really strange is that I ran two tcpdump's
-
sudo tcpdump -v udp port 19132
-
sudo tcpdump tcp port 19132
There no activity in the tcp one, lots of expected activity in the udp one, but both port bindings were needed to see the server in the iPhone client.
I'm wondering if there's a bug in the Docker Desktop network proxy on MacOS; however, the info from lsof -i:19132
looked ok.
I'll update the README with a note on this behavior or a PR is appreciated.
im trying to debug a fresh install, and running tcpdump inside the container—that's what you suggest above, right? just checking because sudo
isnt installed on your image (nor is tcpdump
but that was easily fixed)
I was running those commands on my Mac rather than within the container. I was confirming that even though declaring both types of port bindings seem to help, the TCP one isn’t actually used, as I’d expect.
I’m running this on Mac too, created a customised docker-compose, with a trick borrowed from another repo. works well! You can find in my fork.
@MattrCoUk Can you provide a link to that?
here you are: https://github.com/MattrCoUk/docker-minecraft-bedrock-server/blob/master/examples/docker-compose.yml
Oh...they're not as random as they looked. It would be great if you could PR that example change back to this repo.
sure... how do I do that? :-)
do I need to clone the orig repo update and pull rq?
ok, just found that, will do shortly
dunno how to do it. the PR failed due to test fail.
I believe Minecraft uses TCP in order to display the server list. I'm having a similar issue, but noticed that if I enter the address and port number manually into the servers tab, I was able to connect. I think this is just an issue with the server list.
Trying to get the MC server working on another Mac and run into networking issues again...
Strangely I was able to connect and get on my new MC server world twice by some weird chance, but it prooves not to be repeatable thing...
Tried with macos firewall on/off, even added ports to macos config file. Added the TCP 19123 to docker compose... still no luck.
Any suggestions on how to troubleshoot would be most appreciated...
--
For the reference I have included a fragment of my docker-compose with the trick with limiting of the random second port range. It was working fine for few years on another Mac.
Troubleshoot with Wireshark and report an issue with your findings to Mojang.