Minecraft Server in Docker Container: Port Error?

De
- in Servers
14

Yesterday, I cobbled together a Docker image. Which looks like this (or the dockerfile of the image):

FROM openjdk: 8u212-jre-alpine
RUN mkdir data
WORKDIR / data
VOLUME / data
EXPOSE 27777
CMD java -Xmx2048M -jar server.jar

As far as I know, I've got a volume, put in Server.jar, Eula.txt and server.properites, and now I want to start the Docker container:

Docker run -v / var / lib / docker / volumes / test / _data: / data -p 25565: 27777 --name NAME imagename

Then the container also starts, and outputs the normal startup process of an MC server: And then the error comes:

Loading libraries, please wait…
[10:05:44 INFO]: Starting minecraft server version 1.8
[10:05:44 INFO]: Loading properties
[10:05:44 INFO]: Default game type: SURVIVAL
[10:05:44 INFO]: Generating keypair
[10:05:44 INFO]: Starting Minecraft server on: 27777 [10:05:45 WARN]: FAILED TO BIND TO PORT! [10:05:45 WARN]: The exception was: java.lang.ArithmeticException: / by zero [10:05:45 WARN]: Perhaps a server is already running on that port? [10:05:45 INFO]: Stopping server

I realize that the error is usually issued when the port is occupied ect -> Jeoch I have already spit out sämmtlioche things: - I have changed several times Intenren docker port / host port, - in the server.properties the Changed port, - changed ip in server.properties (127.0.0.1/172.17.0.2/185.239.xxx.xx)
- when starting the contasiner:

docker run --net host -v […]

tries

But why is it? On gitub you can find similar docker-files that basically make the same thing as my image, and they do not work either. Is it due to a misconfiguration of my vServer? Network configuration?

Do I need a proxy or rirgedwas s.der firewall?

LG Thanks in advance.

ps: even the firewall (s) activation did not help…

fo

Try to start the server, if your firewall is off.

De

Nope - executed iptables -L, and then the same error still occurs.

De

@ jerry230602 A firewall other than IPtables is Debian but not right?

fo

Phew, I do not know that.

De

Okay thanks anyway - I guess it is then s.VServer or Ip configuratio 'n of zap or what I
Try it now on a local vm

ar

There are quite a few firewalls on Debian to choose from. With a Debian out of the box but none of them should be installed.

De

I have now updated the vServer with ubuntu - and there ufw and iptables deachtiviert, and still comes the error hm

ar

Did you enter the IP address at the server.properties?

sy

Delete the ip in the server.properties out and leave the entry empty

De

Which of the addresses must be there? That from the host, or the 172.17.0.2 which will be output when i run ikm container 'ifconfig'?

De

Did I already do this? /

De

Or localhost?
* ne is nonsense

ar

The 172.17.0.2 it should be.

De

Okay thanks i'll try it again