itzg / mc-router

Routes Minecraft client connections to backend servers based upon the requested server address

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to read packet -- error=EOF

ethansky opened this issue · comments

I am attempting to setup a Tekkit Classic (MC 1.2.5) server for some friends with the game server on an inner DMZ and mc-router on the outer DMZ. When attempting to connect to the server via mc-router, the MC client fails to join and gives a "end of stream" error. When looking at the logs, I get the following:

time="2023-04-03T14:36:28Z" level=debug msg="Debug logs enabled"
time="2023-04-03T14:36:28Z" level=info msg="Created route mapping" backend="10.10.110.2:27000" serverAddress=tekkit.mydomain.com
time="2023-04-03T14:36:28Z" level=info msg="Listening for Minecraft client connections" listenAddress=":25565"
time="2023-04-03T14:37:15Z" level=info msg="Got connection" client="10.10.10.10:51153"
time="2023-04-03T14:37:15Z" level=debug msg="Reading packet" client="10.10.10.10:51153"
time="2023-04-03T14:37:15Z" level=debug msg="Reading frame" client="10.10.10.10:51153"
time="2023-04-03T14:37:15Z" level=debug msg="Read frame length" client="10.10.10.10:51153" length=2
time="2023-04-03T14:37:15Z" level=debug msg="Reading frame content" client="10.10.10.10:51153" length=2 total=2
time="2023-04-03T14:37:15Z" level=debug msg="Read frame" client="10.10.10.10:51153" frame="Frame:[len=2, payload=0X0024]"
time="2023-04-03T14:37:15Z" level=debug msg="Read packet" client="10.10.10.10:51153" packet="Frame:[len=2, packetId=0, data=0X24]"
time="2023-04-03T14:37:15Z" level=debug msg="Got packet" client="10.10.10.10:51153" length=2 packetID=0
time="2023-04-03T14:37:15Z" level=error msg="Failed to read handshake" clientAddr="10.10.10.10:51153" error=EOF
time="2023-04-03T14:37:15Z" level=debug msg="Closing frontend connection" client="10.10.10.10:51153"

This is what I get when trying to view MOTD/server status from the multiplayer menu:

time="2023-04-03T16:02:00Z" level=info msg="Got connection" client="10.10.10.10:64949"
time="2023-04-03T16:02:00Z" level=debug msg="Reading packet" client="10.10.10.10:64949"
time="2023-04-03T16:02:00Z" level=debug msg="Reading legacy server list ping" client="10.10.10.10:64949"
time="2023-04-03T16:02:03Z" level=error msg="Failed to read packet" clientAddr="10.10.10.10:64949" error=EOF
time="2023-04-03T16:02:03Z" level=debug msg="Closing frontend connection" client="10.10.10.10:64949"

I've done a similar setup in the past using a more modern modpack (1.12 & 1.16), so this may be a case of Minecraft being too old given that it is version 1.2.5.

this may be a case of Minecraft being too old given that it is version 1.2.5.

That's a very good theory.

Definitely looks like it's related to the Netty rewrite between 1.6.4 and 1.7.2: "Minecraft version 1.6.4 and older used a protocol versioning scheme separate from the current one."

Good find. It looks like the packet framing is different but still pretty simple. I'm not sure if this could be reliably detected, so will need a command line argument to indicate "legacy mode" or possibly the specific protocol version.

I'm running into the same; also interested in using this with 1.2.5. Any possible timeline on this?