Dave wrote:

> The better way to get listed on both metaservers is to add metaserver solicitation support in your server.

Yes, having the Netrek server pushing data to the metaservers is superior.   Thank you for the push in the correct direction!

I’ve turned off my port 2591 listener and commented out the listening code.  Go ahead and remove netrek.networkmom.net <http://netrek.networkmom.net/> from your static polling configuration on metaserver2.

I have metaserver push on UDP:3521 working for the base server status, but not for detailed player list.  I’ve decided to leave it at that.  Below is output from metaserver1.netrek.org <http://metaserver1.netrek.org/>.   I’m pushing to each metaserver once every 2 minutes.

                                                 Mins  
Server Host                             Port     Ago  Status            Flags
--------------------------------------- -------- ---- ----------------- -------
-h netrek.sofurry.com                   -p 2592   15  Nobody playing          B
-h hockey.hyperyoda.org                 -p 2592    3  Nobody playing          H
-h continuum.us.netrek.org              -p 2592    4  Nobody playing          B
-h netrek.beeseenterprises.com          -p 2592    1  Nobody playing    T     S
-h pickled.netrek.org                   -p 2592    0  Nobody playing          B
-h netrek.networkmom.net                -p 2592    0  OPEN: 1 player          B
-h netrek.redbudcomputer.com            -p 2592    0  OPEN: 2 players   T     B


FYI, here’s a tcpdump of my push packet, with ASCII printout enabled:

21:40:58.366984 IP 161.35.226.186.56172 > federation.netrek.org.3521: UDP, length 55
E..S.X at .@..^.#..E..`.l...?.3b
netrek.networkmom.net
B
2592
0
1
15
n
n
n
Swift-IPv6

Here’s the format from the C metaserver source:

        sprintf(here, "%s\n%s\n%s\n%d\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n",
                /* version */   "b",
                /* address */   m->ours,
                /* type    */   m->type,
                /* port    */   m->pport,
                /* observe */   m->oport,
                /* players */   nplayers,
                /* free    */   nfree,
                /* t-mode  */   status->tourn ? "y" : "n",
                /* RSA     */   isrsa ? "y" : "n",
                /* full    */   gamefull ? "y" : "n",
                /* comment */   m->comment
                );

Here’s an earlier version which did not seem to result in a detailed player list on the metaserver port 3522. I’ve since commented out the (not working) detailed player list submission:

14:26:38.055190 IP 192.168.0.29.59894 > federation.netrek.org.mc3ss: UDP, length 92
...]..<".(:m..E..x.7.. at ..s....E..`.....d..b
netrek.networkmom.net
B
2592
0
1
15
n
n
n
Swift-IPv6
0
F
2
0
darrellR
SwiftRules
redacted

And the format for that section, repeated per player:

        sprintf(here, "%c\n%c\n%d\n%d\n%s\n%s@%s\n",
                /* number */   players[j].p_mapchars[1],
                /* team   */   players[j].p_mapchars[0],
                /* class  */   players[j].p_ship.s_type,
                /* ??? note change from design, ship type number not string */
                /* rank   */   players[j].p_stats.st_rank,
                /* ??? note change from design, rank number not string */
                /* name   */   name,
                /* user   */   login,
                /* host   */   players[j].p_monitor );


Now I just have to implement a Swift Netrek Robot so people always have something to shoot at!

Darrell


> On Jul 14, 2020, at 7:13 AM, Dave Ahn <ahn at netrek.org> wrote:
> 
> On Tue, Jul 14, 2020 at 3:10 AM Darrell Root <darrellroot at mac.com <mailto:darrellroot at mac.com>> wrote:
> Is that good enough to get the metaserver to work?
> 
> No.
> 
> There are two ways for a server to get listed on the metaserver.  The old, legacy way is to configure the metaserver to connect to ports 2591 and 2592 to retrieve info for the listing.  We generally don't use this anymore.  Your implementation is incomplete or inconsistent because it is not returning expected data to the metaserver.  I've temporarily added your server to metaserver2 so you can see this and make changes.  The metalog is below.  Let me know when you are done fixing, and I will remove this manual entry from metaserver2.
> 1594734993: connected to netrek.networkmom.net <http://netrek.networkmom.net/> (2591)
> 1594734993: connected to netrek.networkmom.net <http://netrek.networkmom.net/> (2592)
> 1594735099: ERROR: read buffer flooded by server netrek.networkmom.net <http://netrek.networkmom.net/>
> 
> BTW, your empty server 2591 is returning an empty player list vs "No one playing."  (See continuum's reply when it's empty.)  Not sure if this matters.
> 
> The better way to get listed on both metaservers is to add metaserver solicitation support in your server.  Your server then sends listing information to one or more metaservers over UDP/3521 (point to metserver[12].netrek.org <http://netrek.org/>).  Once you get this working, your server should show up on metaserver1.
> 
> 
> _______________________________________________
> netrek-dev mailing list
> netrek-dev at us.netrek.org
> http://mailman.us.netrek.org/mailman/listinfo/netrek-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20200714/df297b2f/attachment-0001.htm>