docker-minecraft-server: MTU mismatch causing server jar download to fail
Describe the problem
I just pulled the most recent version of this image and changed the server version to 1.20.1 and now the server is not starting anymore, but instead crashing because of the ssl timeout for some reason. I’ve included all the logs below.
Container definition
version: '2.3'
services:
minecraft:
image: itzg/minecraft-server
environment:
MEMORY: '8G'
EULA: 'TRUE'
VERSION: '1.20.1'
volumes:
- ./usbcraft:/data
ports:
- 25565:25565
restart: always
Container logs
Starting minecraft_minecraft_1 ... done
Attaching to minecraft_minecraft_1
minecraft_1 | [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 12 1000 1000 4096 Jul 7 20:43 /data'
minecraft_1 | [init] Resolving type given VANILLA
minecraft_1 | [mc-image-helper] 20:47:31.137 ERROR : 'resolve-minecraft-version' command failed. Version is 1.32.5
minecraft_1 | reactor.core.Exceptions$ReactiveException: io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 30000ms
minecraft_1 | at reactor.core.Exceptions.propagate(Exceptions.java:408)
minecraft_1 | at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:100)
minecraft_1 | at reactor.core.publisher.Mono.block(Mono.java:1712)
minecraft_1 | at me.itzg.helpers.versions.ResolveMinecraftVersionCommand.call(ResolveMinecraftVersionCommand.java:26)
minecraft_1 | at me.itzg.helpers.versions.ResolveMinecraftVersionCommand.call(ResolveMinecraftVersionCommand.java:12)
minecraft_1 | at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
minecraft_1 | at picocli.CommandLine.access$1500(CommandLine.java:148)
minecraft_1 | at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
minecraft_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
minecraft_1 | at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
minecraft_1 | at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
minecraft_1 | at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
minecraft_1 | at picocli.CommandLine.execute(CommandLine.java:2170)
minecraft_1 | at me.itzg.helpers.McImageHelper.main(McImageHelper.java:149)
minecraft_1 | Suppressed: java.lang.Exception: #block terminated with an error
minecraft_1 | at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:102)
minecraft_1 | ... 12 common frames omitted
minecraft_1 | Caused by: io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 30000ms
minecraft_1 | at io.netty.handler.ssl.SslHandler$7.run(SslHandler.java:2125)
minecraft_1 | at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
minecraft_1 | at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:153)
minecraft_1 | at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
minecraft_1 | at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
minecraft_1 | at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
minecraft_1 | at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:406)
minecraft_1 | at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
minecraft_1 | at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
minecraft_1 | at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
minecraft_1 | at java.base/java.lang.Thread.run(Unknown Source)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (5 by maintainers)
SOLVED!
It was a MTU problem, my network setup is not straight forward as I have all my docker containers connected to the internet through a wiregard VPN so I can use the static IP from a small VSP I rent:
So the MTU is not the default 1500 as it is in most networks but 1400 as you can see from the output above. Docker dosen’t automatically configure continers the same way, but just uses the normal 1500:
I’ve been using this setup for as long as I’ve used this docker image, so I have no idea why it stopped working just now. To solve this I changed my
docker-compose.yml
to:Now even inside the container the MTU is set to 1400 and everything works nicely.
Even tho I don’t think my specific OS, kernel or Docker have something to do with this problem this is what I’m running:
I’m so glad you found the cause and thanks for posting your research here. This will be great help for anyone else that runs into this.