Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Duplicate entries in multiplayer server list #74

Closed
TheDude-gh opened this issue Oct 24, 2021 · 16 comments · Fixed by #75
Closed

[Bug]: Duplicate entries in multiplayer server list #74

TheDude-gh opened this issue Oct 24, 2021 · 16 comments · Fixed by #75

Comments

@TheDude-gh
Copy link

Version of OpenTTD

from 12.0 onward

Expected result

Unique servers in server list

Actual result

Duplicate entries in server list, when search internet is pressed in lobby window

Steps to reproduce

Click search internet in multiplayer window.

Look for duplicate entries, there's aplenty.

@TrueBrain
Copy link
Member

TrueBrain commented Oct 24, 2021

This ticket lacks a bit of information for me to do anything with. Sure, there are a few "duplicated entries", but those are in fact different servers which happen to have the same name.

Can you provide screenshots of the issue you are seeing. Please create a screenshot of both servers you consider duplicates, including the part on the right that shows the details of that server. With that info I can trace what you are actually seeing and what is going on :) Tnx!

@James103
Copy link

James103 commented Oct 24, 2021

For example, in the arctic-tycooners group of servers, many pairs of servers have the same name, but in each pair, one server has an invite code, while the other server has an IP address. In this example, both servers have the same full name: arctic-tycooners OpenTTD/OpenTTD#4 [Medium] [NARS] [FIRS] [1900-2100]

Invite code IP address
image image

@TrueBrain
Copy link
Member

They also run two different versions. This suggests to me that someone is actually running both. I will investigate, but this feels like "human error" :)

@James103
Copy link

James103 commented Oct 24, 2021

The server name reddit.com/r/OpenTTD 4 - Vanilla (Toyland) appears twice on the server list, with each server having a seperate IPv4 address and running a seperate game. This is likely because the pair likely consists of a main and secondary server.

Server 1 Server 2
image image

When clicking "Refresh" on both servers, the 1985 entry goes "SERVER OFFLINE", while the 2030 entry remains online and updates accordingly, but returns to the previous date on the next "Search Internet".

Possible solution Possible solution: Enforce uniqueness in the name of the server. In other words: * Starting a server with name "Unnamed Server" will hide it from server listings. * Starting two servers with the same name will hide one of them from server listings. * Instead of hiding from server listings, a number would be appended to the server name in the listings, such as `My Server (2)`.

@TrueBrain
Copy link
Member

Before we jump to conclusions, lets first gather facts ;)

So basically, for pre-12.0 servers that have more than one IP, you see 1 entry each. This has always been the case, so that on its own is not a bug/problem. 12.0 solves that (finally). The only thing I wonder about is why one is updated (server-info-wise) and the other is not. That is something I want to look into :)

@frosch123
Copy link
Member

Example for 1.11.2:

  • 1 entry on website with 2 IP.
  • 3 entries in game with 3 IP.

btpro12a

Example for 12.0:

  • 1 entry on website with 1 invite code.
  • 2 entries in game with 2 invite codes.

tgvanilla

@TheDude-gh
Copy link
Author

It's more likely bug of game controller than OpenTTD itself, since OpenTTD only displays what is sent in the GC listing packet.

I am quite sure that experienced community servers like BTpro and Arctic tycooners does not run servers with the same names. And displaying two entries for each IP type or invite code is at best confusing.

Little sidenote: I also find it pretty useless to send some 6000+ newgrf info in the GC listing packet, since there is usually around 700-800 unique NewGRFs online at any time. But then, it could make only maybe 300kB difference in packet size, so maybe it's not so big deal nowadays.

@TrueBrain

This comment has been minimized.

@TrueBrain
Copy link
Member

Observed behaviour:

  • For 1.11 servers all IPs showed up as separate server. They should be de-duplicated on their session-key.
  • The TG server got a new invite-code (how? that should never happen?). Normally not an issue, possibly related to their server-setup.
  • When a 12 server gets a new invite-code, the old one remains listed on one of the two GC instances.
  • Servers upgrading from 1.11 to 12 remain listed under both versions; possibly only on one of the two GC instances.

Did a rolling restart of the GC instances; resolved all issues. Which means the database was correct, just the reflection of it in the GC instances was not.

Moving ticket to GC repo.

@TrueBrain TrueBrain transferred this issue from OpenTTD/OpenTTD Oct 24, 2021
@TheDude-gh
Copy link
Author

Restarting it was unfortunately only temporary solution. There are already new duplicates.

@TrueBrain

This comment has been minimized.

@TheDude-gh

This comment has been minimized.

@TrueBrain

This comment has been minimized.

@TheDude-gh

This comment has been minimized.

@TrueBrain

This comment has been minimized.

@TheDude-gh

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants