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

Race Condition? / Round Robin? / Seemingly Random Routing

AugusDogus opened this issue · comments

commented

Connecting to the servers works as intended, however when adding each server to the server list on the multiplayer tab I've found that they share a motd and player count.

I previously thought that connecting to the servers worked as intended and that the motd/playercount was using a different protocol for fetching that information and that's why it was failing, but on further inspection it appears that whichever motd/playercount is displayed is the server the client will connect to, regardless of subdomain/host.

This looks a lot like a race condition. Maybe I've improperly configured my mc-router container?

docker run -d --name minecraft-router -p 0.0.0.0:25565:25565/tcp --network=cloudbox itzg/mc-router --mapping=mc.example1.com=minecraft:25565,mc.example2.gg=minecraft-test:25565

Where example1.com and example2.com are different TLDs.

By the logs it looks like it's working, but ¯\(ツ)

image

Refreshing the list will often leave one server with a motd and the other will timeout

image

On a second refresh the motd and player count display properly, but the server-icon.png displays as a black image still.

image

Then all subsequent refreshes will sometimes be correct and sometimes show the same errors as above.

commented

After connecting to the top server, the server-icon displays slightly, albeit with other issues.

image

Unlike bungee, etc mc-router routes only at the packet layer only for the handshake and backend resolution. After that it streams the connection without any awareness nor influence on thing s like MOTD. If the logs looks right, then that's what it's routing.

I know that doesn't help your immediate issue, but I'm not sure more the router can do.