arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
684 stars 144 forks source link

Player Count Discrepancy #1114

Closed mmeija closed 4 years ago

mmeija commented 4 years ago

I'm finding what the ark-server-tools thinks vs the real amount of players online differs

as shown: arkmanager status shows 3 players, rconcmd listplayers shows 6

arkserver@OptiPlex-3020:~$ bin/arkmanager status && bin/arkmanager rconcmd listplayers Running command 'status' for instance 'main' Server running: Yes Server PID: 1690 Server listening: Yes Server Name: x - (v311.99) Players: 3 / 30 Active Players: 2 Server online: Yes ARKServers link: http://arkservers.net/server/x:27015 Steam connect link: steam://connect/x:27015 Server build ID: 5169549 Server version: 311.98 Running command 'rconcmd' for instance 'main' "

  1. x, x
  2. x, x
  3. x, x
  4. x, x
  5. x, x
  6. x, x
  7. x, x " arkserver@OptiPlex-3020:~$
mmeija commented 4 years ago

I'm guessing this relates to epic players; My server is running with -crossplay and -UseVivox

steam's native server browser also seems inaccurate showing 3 players

klightspeed commented 4 years ago

The status query uses the A2S_INFO and A2S_PLAYER queries https://developer.valvesoftware.com/wiki/Server_queries, which presumably only list Steam players. I wonder how Epic players are identified, given that a lot of the documentation for ARK whitelists etc. assume Steam player IDs.

Ramblurr commented 4 years ago

Could this be related to the fact that my cron job that runs arkmanager restart --warn --saveworld will announce that there are no connected players, and shutsdown, despite players (Only epic clients) connected?

klightspeed commented 4 years ago

89e80de uses rconcmd listplayers to check if anyone is connected if arkflag_crossplay or arkflag_epiconly are set, since the query port only returns Steam players, and there seems to be no other way of checking the total number of players connected.

mmeija commented 4 years ago

Thank you very much for your effort

I'm still trying to debug in more detail but for now I get mixed results

arkserver@mmeija-OptiPlex-3020:~$ bin/arkmanager status && bin/arkmanager rconcmd listplayers
Running command 'status' for instance 'main'
 Server running:   Yes 
 Server PID:   3697707 
 Server listening:   Yes 
Server Name: x Cluster PvP - (v312.65)
Steam Players: 0 / 30
Active Steam Players: 0
 Server online:   Yes 
 ARKServers link:   http://arkservers.net/server/x:27015 
 Steam connect link:   steam://connect/x:27015 
Active Players: 4
 Server build ID:   5349305 
 Server version:   312.65 
Running command 'rconcmd' for instance 'main'
"
0. x, x
1. x, x 
 "

currently I believe the two players that are online are Epic players

klightspeed commented 4 years ago

That looks like only lines starting with a number are valid. b4ac7a2 should now display the correct player count, based on your rconcmd listplayers output.

mmeija commented 4 years ago

This is working well for me now, thank you