itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.14k stars 218 forks source link

Minecraft noob here; wanting to learn #47

Open rogierlommers opened 4 years ago

rogierlommers commented 4 years ago

Hey, first of all: bear with me. I'm a Minecraft noob :).

I'm trying to setup a simple minecraft server for my son (playing on his iOS device). So I think I need to run a bedrock instance, right?

So I tried to start a container using this: docker run -it -v /srv/local/services/minecraft/data:/data -e EULA=TRUE -p 19132:19132/udp itzg/minecraft-bedrock-server. All fine, container running and healthy.

But then what? When I try to connect to the instance from the iOS minecraft game, then I can't connect (by ip address:port). So first thing is trying to find out if the container is actually working fine. So -on the server- I'm trying to do a telnet:

rlommers@server [~]$ telnet localhost 19132
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Which is a bit strange, right? docker ps outputs this:

8b7721640b4c        itzg/minecraft-bedrock-server   "/usr/local/bin/entr…"   3 minutes ago       Up 3 minutes (healthy)   0.0.0.0:19132->19132/udp                                                     friendly_nobel

So basically my question is: how do I connect to a running instance of a bedrock server on an iOS device?

ghost commented 4 years ago

Can you connect to the server from any other device? Does the server have any firewall blocking ports?

itzg commented 4 years ago

Like @xnaas, I was going to suspect a firewall issue.

FYI, telnet won't work for testing as far as I know since bedrock is using UDP rather than TCP. nc -u could work for debugging, but even then bedrock speaks a proprietary, binary protocol so you could only verify port connectivity and not any meaningful response.

You could use mc-monitor status-bedrock from different points in your network to natively verify the network access.

rogierlommers commented 4 years ago

Thanks; all works fine now. One thing though: my iOS devices do not always "see" the server. During these cases, the mc-monitor tool perfectly is able to connect. So must be something iOS-related I guess?

Of course, I checked my wifi network: wireless/client isolation is off.

itzg commented 4 years ago

If your host system is Linux or MacOS you could use tcpdump to help debug that the broadcast/connect packets sent by the client are arrive at the host:

sudo tcpdump -vv udp port 19132

If you're using Docker Desktop on Windows, I have found switching my network from public to private helps.

cstromme commented 4 years ago

I'm having the exact same issue here. How did you solve this @rogierlommers?