mc-router icon indicating copy to clipboard operation
mc-router copied to clipboard

Race Condition? / Round Robin? / Seemingly Random Routing

Open AugusDogus opened this issue 3 years ago • 2 comments

~~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.

AugusDogus avatar Dec 06 '21 16:12 AugusDogus

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

image

AugusDogus avatar Dec 06 '21 16:12 AugusDogus

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.

itzg avatar Dec 06 '21 17:12 itzg