-
Notifications
You must be signed in to change notification settings - Fork 144
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: valheim player count is wrong #539
Comments
I actually think it is cus its a crossplay server, could it be it? |
Hey! Did some testing in random servers from this list and didn't find any discrepancies. Do you mind sharing the ip:port you were testing? |
@podrivo he mentioned the ports he tried and provided a code snippet that includes the IP: 167.86.77.2 I too have tried a bunch of random servers and they seem to respond as expected. |
Oh, missed that... Thanks! (: So, for the IP provided —
|
I wonder if there is some weird setup on my end then, as I just again tried to see (5 players online - queried 0) Any ideas what it could be? I am indeed running on 2460 |
Neither do I, in the last 7 days myself and a few people have played on the server so the metrics is not correct. I suspected it to be a port issue - but since the query port actually retrieves correct server metadata, apart from player count, I am left baffled.. edit: here is an attached database query for all players that has been online the last 7 days |
Hmmmm, when creating Valheim servers, are there options for supporting multi platforms? This is just a thought but maybe the player count is correct on a single platform and reported incorrectly for multi platforms ones, if not, I don't really know whats going on here. |
Yes its called "crossplay" |
@PatricNox Where did you get that screenshot? Which settings exist to toggle when creating the server? |
The screenshot is from a database I made to store character information, this is custom made and the data is filled in when players login to the server. Here is an ingame screenshot of the very same server: As you can see, there's players here - so I am clueless to why this is happening ,as the game seems to be able to retrieve the player count just fine but battlemetrics/gamedig not This is the server startup:
From Valheim docs, query port is port +1 (2460 + 1) Thanks for sticking with me! |
Additionally: running with crossplay param, to let the server be connectable from both PC and Consoles, the server is using PlayFab. Despite being clueless, my guess is around these crossplay areas.. |
One thing we could try is removing the On a second thought, do you know what the
|
I will experiment with Regarding |
Got them from the query response:
|
Hello, I have been in contact with a developer of Valheim and I've found out the reason behind all this. TLDR, it is indeed crossplay. When crossplay is enabled, the local query port will show 0 players. The real number is exposed through another (less-accessible) channel to Valheim clients. To work around this restriction, server operators typically query the operating system for UDP endpoints using a tool like netstat, ss, or lsof. It's not as pretty: I was given this example along with a Quote:
So.. Yeah.. 🙃 |
Unfortunately, I'm not sure there's much we can do about this... |
Describe the bug
2 people online, server is running on 2460, i tried both 2460 (game port) and 2461 (query port) but both gives 0 players online
Steps To Reproduce
Start valheim server, try gamedig
Screenshots or Data
Additional details
5.0.0-beta-2
The text was updated successfully, but these errors were encountered: