News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Bugs/issues with serverlist

Started by Ashley, August 21, 2011, 09:12:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

I'm noticing some problems with the server listing website.

There are a lot of servers there which show up in green, yet don't respond when queried. There are also quite a lot of servers which are invalid and don't show any realistic data. Maybe we need some way to prune servers which haven't responded in a couple of days from the listing? If a server isn't active it shouldn't really show up in the list.

It'd also probably be a good idea to have an exclusion set in the software to prevent registration of servers whose IP addresses are either localhost (127.0.0.1) or in RFC1918 blocks (192.168.0.0/16, 10.0.0.0/8 or 172.16.0.0/12) since these servers by definition cannot be connected to over the Internet and so have no place in the listing.

There are broken entries, like:

43.84.89.78.37:93.76.57.84.61.98: 13353 64.milionarie.merion.me.uk milionarie 4359
0.110.0.1 64 0.110.1


The first field is in the IPv6 field, but is clearly not an IPv6 address.

Then there are these entries:

2001:470:1f09:398::2 13353 simutrans128na.dip.jp 128online 4359
0.110.0.1 128 1.4.6


Which for some reason come up with the same IPv6 address as my servers.

Another example of a broken one:

5289345628927346739o207483 13353 64.simutrans.entropy.me.uk Entropy - pak64 Server 4359
0.110.0.1 64 110.0.1


This is a duplicate, the other one's listing is fine but this one seems corrupted somehow.

And another:

4683923 196 Fiktive Pascallok Michatz 4359
0.110.0.1 Pak 64.german


And another:

  13353 http://sourceforge.net/projects/simutrans Simutrans 110.0.1 - r4359 r4359 128

There's also this duplicate with an incorrect pakset name:

pak128. ( 1 )    IPv4/IPv6 Port DNS Name Revision Pakset

Server online
Server and Map info 2001:470:1f09:398::2 13353 128.simutrans.entropy..me.uk Pak128nightly.r505 4359
0.110.0.1 pak128.open.r505



Of all the servers listed in green, the only ones I was able to connect to were my own and Prissi's gift server. Quite a high signal-to-noise ratio there really :(
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

If you think you can do a better serverlist (and Franks server cannot run cron or other time dependent utilities) you are free to do so. Frank volunteered, and I was happy to had support for it at that time. If it works better I can change the address in the source code to your server.

Nevertheless I think a manual clearing of server by an admin is really mandatory for such lists in the long term.

Ashley

I'll see if I can throw something together.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Frank

#3
if user enter garbage I can not help it

and if the server does not log regularly (server_announce_intervall > 0) I can not help it

Why should the list server to query the simutransserver when simutransserver run anyway and can register with the server list? If they do not this, after a certain time set down and sent one mail to the operator, provided that an e-mail address is specified.



I set all server to off

your server not set server_announce_intervall > 0 then restart your server for set online

or set manual online

Ashley

I think it might be good to change server_announce_interval so it happens every so often in real time rather than game time (e.g. every 15 minutes, rather than every ingame month) since different paksets have different ideas of the length of a month. That way we could set a global timeout value for the length of time a server can't have reported in for before being marked as "tentatively offline" (e.g. yellow status).

Would there be a downside to making this change? A small HTTP request every 15 minutes doesn't seem too taxing in terms of server bandwidth compared to the normal gameplay traffic and it'd improve reliability of the listings.

EDIT: To clarify the announce_interval would become non-configurable (e.g. it'd be set at say 15 minutes) - the setting would become a simple choice between turning server announcements on or off. I don't see much help in having this configurable as it simply makes it impossible to say whether a given server is online or not.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

The internal simutrans loop is not really very well suited to run with real times. Everything is done in game times. And I am not sure how announcement would work with autopause, if it works at all.

Ashley

Autopause I hadn't considered, I have written a patch to enable the behaviour I described otherwise though. I'll have to look at what happens during pause and whether announcements can continue to work. Am I correct to think that the dr_time() function returns the current time in milliseconds? Or at least the number of ms since the game started or somesuch?

I also have a working listing server but it needs some further work. I'll post the patch later when I have a chance.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

dr_time uses timeGetTime, which may run into problems evrey 49,71 days:
Quote
Note that the value returned by the timeGetTime function is a DWORD value. The return value wraps around to 0 every 2^32 milliseconds, which is about 49.71 days. This can cause problems in code that directly uses the timeGetTime return value in computations, particularly where the value is used to control code execution. You should always use the difference between two timeGetTime return values in computations.

Ashley

Oh so that'll be find so long as the announce interval isn't longer than 49.71 days (which would be silly), I am using:

dr_time() - server_last_announce_time >= umgebung_t::announce_server_interval * 1000

Where announce_server_interval is the interval in seconds, and server_last_announce_time is set using dr_time() at the end of the announce() function. I plan on sending announce_server_interval as a parameter to the listings server so that it can adapt to different settings of this value. Then it'll mark a server as offline if it doesn't report in for say double that length of time.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.