Tiiffi / mcrcon

Rcon client for Minecraft
https://github.com/Tiiffi/mcrcon/
zlib License
846 stars 116 forks source link

Can't use mcrcon with minecraft server by using docker #79

Closed Char11e closed 2 years ago

Char11e commented 3 years ago

Hi Tiiffi

I want to ask you a question regarding my minecraft server by using docker

I have packaged two MC server (MC 1.16.5 and MC forge 1.12 )image by using docker I already set up the rcon command in server.properties of two server.

one set up as : rcon.port=25575 rcon.password=XXXXXX enable-rcon=true

the other set up as: rcon.port=25574 rcon.password=XXXXXX enable-rcon=true

Then , I use mcrcon , but the program always show "Connection fail ".

I am not sure where the question is.

Sincerely, Charlie

phsndev commented 3 years ago

Using the tool for a similar feature, i've come across "Connection failed" as well, came here looking for answers, wondering if it has been deprecated.

Edit: It's working as intended

Xaver106 commented 3 years ago

Are you connecting from a different mashine or the localhost? If you try to runn it from a different mashine, you need to check if the rcon Ports are allowed in the firewall of the server. Maybe even check if the Docker may block the request.

Sleuth56 commented 2 years ago

I just ran into this as well. My solution was port publishing port 25575 to the host. The issue is while the docker container might be listening on port 25575 the host is not. You have to tell Docker to listen on that port. https://docs.docker.com/config/containers/container-networking/#published-ports