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

Add givenPortOnly config for GameDig monitor #2887

Closed
2 tasks done
shadowgamingyt opened this issue Mar 5, 2023 · 5 comments · Fixed by #3532
Closed
2 tasks done

Add givenPortOnly config for GameDig monitor #2887

shadowgamingyt opened this issue Mar 5, 2023 · 5 comments · Fixed by #3532
Labels
feature-request Request for new features to be added
Milestone

Comments

@shadowgamingyt
Copy link

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

some of my servers work loading the up time etc but ones that i am using gamedig to access the servers uptime directly it does not work at all and just says its offline constantly
image

🐻 Uptime-Kuma Version

1.20.2

💻 Operating System and Arch

22.04.2 LTS

🌐 Browser

edge

🐋 Docker Version

No response

🟩 NodeJS Version

No response

@fletchowns
Copy link

I was having a similar issue with my gamedig monitors. I thought it was related to my firewall rules restricting access to these game servers, meaning that uptime-kuma running in a container on the same server wasn't able to access it. That doesn't seem to be the case though.

As a test, I tried to manually install gamedig in my uptime-kuma container using npm install gamedig, and I'm able to successfully query my game servers:

uptime-kuma@36af169156a9:~$ ./node_modules/.bin/gamedig --type dayz dayz.my-docker-network:2302
{"name":"My DayZ Server...
uptime-kuma@36af169156a9:~$ ./node_modules/.bin/gamedig --type valheim valheim.my-docker-network:2456
{"name":"My Valheim Server...

However the equivalent config through uptime-kuma doesn't seem to work:
image

Didn't find anything revealing in the logs:

2023-03-06T23:20:44-08:00 [MONITOR] WARN: Monitor #17 'DayZ': Failing: Failed all 1 attempts | Interval: 60 seconds | Type: gamedig | Down Count: 0 | Resend Interval: 0

@chakflying
Copy link
Collaborator

chakflying commented Mar 7, 2023

Can you try setting the DayZ port to 27016 in the monitor?

@louislam
Copy link
Owner

louislam commented Mar 7, 2023

It seems that givenPortOnly set to false, it will work. Or as @chakflying said, using 27016 also works.

givenPortOnly: true,

I checked the games.txt, there is a value called port_query_offset.

dayz|DayZ (2018)|valve|port=2302,port_query_offset=24714

2302 + 24714 = 2016

What I don't understand here is, what is the point of showing the fake port (2302) instead of 27016?

@chakflying
Copy link
Collaborator

I think 2302 is the port that clients actually connect to, while 27015+ is the Valve Server Query Protocol which is used to query the server status. Some info in notes in https://github.com/Yepoleb/python-a2s .

The discussion in #2566 suggested the use of givenPortOnly because server admins would know which port to use. But it seems that now normal users also wanted to use this feature to monitor games they play, and made it confusing.

@shadowgamingyt
Copy link
Author

for mordhau ive tried all ports possible even reinstalling the server changing the ports to its recommended to run the server and still nothing and everything is port forwarded. in console it shows its talking but it ant getting data that its up
image

image

@louislam louislam added this to the 1.22.0 milestone Mar 12, 2023
@louislam louislam added feature-request Request for new features to be added and removed help labels Mar 12, 2023
@louislam louislam changed the title Server connection issue Add givenPortOnly config for GameDig monitor Mar 12, 2023
@louislam louislam modified the milestones: 1.22.0, 1.23.0 Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants