splewis / get5-web

An unsupported, proof-of-concept webpanel for servers using the get5 CS:GO server plugin. Please don't use it.
https://get5.splewis.net
GNU General Public License v3.0
103 stars 58 forks source link

Test if http requests are going through? #61

Closed cre0n closed 6 years ago

cre0n commented 7 years ago

Heyo, is there a get5 console command to test the http requests? I can get them to work with Insomnia with https://ip/match/<matchid, i.e. 83>/map/<mapno, i.e. 0>/start but it doesn't seem to work out when playing with the plugins on the gameserver. Is there anything I've overseen to try and debug my problem? :s

Technoblazed commented 7 years ago

Check your server error logs to see if anything is being recorded.

cre0n commented 7 years ago

They all seem to work, every event is being shown without any error msg afterwards

splewis commented 7 years ago

To be specific, you should look at the error logs in addons/sourcemod/logs.

(I've updated https://github.com/splewis/get5/wiki/Debugging-help#getting-error-logs also)

cre0n commented 7 years ago
L 07/31/2017 - 23:46:11: SourceMod error session started
L 07/31/2017 - 23:46:11: Info (map "de_mirage") (file "errors_20170731.log")
L 07/31/2017 - 23:46:11: [SM] Exception reported: Could not connect to get5 database: Configuration "get5" not found
L 07/31/2017 - 23:46:11: [SM] Blaming: get5_mysqlstats.smx
L 07/31/2017 - 23:46:11: [SM] Call stack trace:
L 07/31/2017 - 23:46:11: [SM]   [0] SetFailState
L 07/31/2017 - 23:46:11: [SM]   [1] Line 61, ./scripting/get5_mysqlstats.sp::OnPluginStart
L 07/31/2017 - 23:46:11: [SM] Unable to load plugin "get5_mysqlstats.smx": Error detected in plugin startup (see error logs)
L 07/31/2017 - 23:47:41: [get5_apistats.smx] Failed to create logo directory
L 07/31/2017 - 23:47:46: Error log file session closed.

Is the get5-called table in a database required for the httprequests to work? :s

the get5_debug log gives me all the events, with "changing state 4 -> 5" etc, but only once something about steamworks; at the beginning: [get5] cleanedUrl (SteamWorks) = http://IP/matchconfig.cfg, even though I'm putting an https when loading it on my server console due to LetsEncrypt. Might https be the problem for the web api url as well? always putting it on get5_web_api_url "https://IP" and get5_web_api_key "xyz"

splewis commented 7 years ago

Is the get5-called table in a database required for the httprequests to work? :s

I don't understand that question. But you don't need the get_mysql stats plugin if you're using the webpanel and the get5_apistats plugin. The apistats plugin reports stats to a web API, which stores them in mysql. the mysql plugin puts them directly in a mysql table.

You should actually set the get5_apistats_debug cvar to 32 to get debug logs. I'll probably update that cvar so it matches the normal get5_debug log, sorry about that.

cre0n commented 7 years ago

L 08/02/2017 - 20:18:42: [get5_api] get5_web_api_url now set to https://IP/ L 08/02/2017 - 20:18:53: [get5_api] get5_web_api_url now set to https://IP/ L 08/02/2017 - 20:23:33: [get5_api] get5_web_api_url now set to https://IP/ L 08/02/2017 - 20:23:43: [get5_api] get5_web_api_url now set to https://IP/ L 08/02/2017 - 20:29:58: [get5_api] Trying to create request to url https://IP/match/83/map/0/start L 08/02/2017 - 20:29:58: [get5_api] Added param key=KEY to request L 08/02/2017 - 20:29:58: [get5_api] Added param mapname=de_cache to request L 08/02/2017 - 20:30:08: [get5_api] get5_web_api_url now set to https://IP/ L 08/02/2017 - 20:31:07: [get5_api] Trying to create request to url https://IP/match/83/map/0/update L 08/02/2017 - 20:31:07: [get5_api] Added param key=KEY to request L 08/02/2017 - 20:31:07: [get5_api] Added param team1score=1 to request L 08/02/2017 - 20:31:07: [get5_api] Added param team2score=0 to request L 08/02/2017 - 20:31:07: [get5_api] Trying to create request to url https://IP/match/83/map/0/player/STEAMID/update

I'm not seeing it :( Is it supposed to say "trying to"?

splewis commented 7 years ago

I'm not seeing it :( Is it supposed to say "trying to"?

Yes.

I think your problem is what I describe here, though:

Note: due to a limitation in how API requests are sent from the game server to the web server, you must have a domain associated with the web panel. Just hosting it at an ip:port will not work and will cause match updates from the game server to not reach the web panel.

Last time I tried, sending http requests through SteamWorks failed when just using an ip address. Whether that's a bug in steamworks (the valve part), steamworks (the sourcemod extension), or get5 - I don't know. I haven't spent time investigating.

The workaround would be to get a domain name for the server. I might play with this extension and see if it has this issue.

cre0n commented 7 years ago

I've tried it with a domain a friend lent me; same thing. Still working with Insomnia, not with the plugin though :( I really don't get it, even tried reinstalling the CS:GO server multiple times.. q.q

splewis commented 7 years ago

Still working with Insomnia

I don't know what that means.

I would suggest trying my web instance: http://get5.splewis.net, because I don't know how to help further here.

cre0n commented 7 years ago

https://insomnia.rest/

Didn't think of that, i'll try it when i'm home later today. Thanks for the tip!

splewis commented 6 years ago

Closing since I don't think there's anything to do here.

https://github.com/splewis/get5-web/issues/12 seems related.