mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #299] [LGSM] Support RCON for applicable games #258
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#258
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Montclair on GitHub (Feb 25, 2015).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/299
Originally assigned to: @dgibbs64, @UltimateByte on GitHub.
When using the gsquery.py plugin to monitor a server, it causes the server to restart when it's not really crashed. This happens when we load a config that uses sv_cheats 1. It's a practice config called L2L Config, not that that's of any importance. It's the sv_cheats 1 that's the issue (I and others in the community believe).
Specifically, when the server is running in this mode, it is not responsive to status queries, thus, gsquery.py thinks the server has crashed when it has not, and causes it to restart. I've checked the logs and verified it:
Feb 24 21:00:02 l4d2-server3: Monitor: Checking session: CHECKING
Feb 24 21:00:03 l4d2-server3: Monitor: Checking session: OK
Feb 24 21:00:04 l4d2-server3: Monitor: Detected gsquery.py
Feb 24 21:00:05 l4d2-server3: Monitor: Querying port: 104.207.128.135:27017 : QUERYING
Feb 24 21:00:11 l4d2-server3: Monitor: Querying port: 104.207.128.135:27017 : ERROR: Unable to receive
Feb 24 21:00:12 l4d2-server3: Monitor: Waiting 30 seconds to re-query
Feb 24 21:00:42 l4d2-server3: Monitor: Detected gsquery.py
Feb 24 21:00:43 l4d2-server3: Monitor: Querying port: 104.207.128.135:27017 : QUERYING
Feb 24 21:00:49 l4d2-server3: Monitor: Querying port: 104.207.128.135:27017 : ERROR: Unable to receive
Feb 24 21:00:50 l4d2-server3: Restarting:
Feb 24 21:00:50 l4d2-server3: Stopping:
Feb 24 21:00:51 l4d2-server3: Stopping: Stopped
Feb 24 21:00:52 l4d2-server3: Starting:
Feb 24 21:00:53 l4d2-server3: Starting: Rotating log files
I'm asking others in the L4D community if there's a system variable or file that gets created that I could check for existence and perhaps modify your script to abort the call. But I wanted to put this out there to you in case you possibly had a fix or an idea.
Servers that support RCON
@dgibbs64 commented on GitHub (Feb 25, 2015):
If the server is not responsive to status queries gsquery cannot function as it requires this to monitor and will assume the server is offline. I recommend deleting gsquery unless you can get the query port working on the server.
@Montclair commented on GitHub (Feb 27, 2015):
According to other sysops, Left 4 Dead 2's server will never respond to the type of connect you're doing when cheats are enabled. This may be true of other Source servers as well, but of that I'm not sure.
Is there not some way for you to query the server using rcon? SourceBans (a php based server banning tool, for example) performs rcon queries to check a server and actually get current game info.
python-valve is a Python library which aims to provide the ability to interface with various Valve services and products, including: the Steam web API, locally installed Steam clients, Source servers and the Source master server. Here is documentation on how to use the rcon tool from that ibrary: http://python-valve.readthedocs.org/en/latest/rcon.html.
If you want to do it in bash, here is another script: https://gist.github.com/mbasaglia/62d7fef83304f4b3ca90
Example usage:
./rcon.sh -host=localhost:26000 -pw=password -secure=2 -c status 1
@dgibbs64 commented on GitHub (Mar 21, 2015):
This may be worth me doing at some point. It may be of benefit to get the script to send rcon commands to the server. However this would be an enhancement I will look at then I have time.
@UltimateByte commented on GitHub (Jan 23, 2016):
While this is a great idea, it wouldn't work in any case. For example, i disable rcon by not setting a password on my servers as soon of possible for security reasons.
@Montclair commented on GitHub (Jan 25, 2016):
It wouldn't work for you, I think you mean. I'd still like to see this implemented.
@UltimateByte commented on GitHub (Jan 25, 2016):
I'm not against he idea, i just mean that we can't only rely on it as it doesn't work 100%of the time.
@Montclair commented on GitHub (Jan 25, 2016):
Right, but neither does the current method. A combination of the current method, and / or fallback to this method would be an ideal solution.
@UltimateByte commented on GitHub (Jan 25, 2016):
Agreed since my first remark, i was just warning : Don't rely ONLY on rcon querying after implementing it ! Even : Find a way to detect if it's enabled before !
@UltimateByte commented on GitHub (Jan 19, 2017):
Some insight about an rcon script:
http://steamcommunity.com/groups/linuxgsm/discussions/0/144513670981268947/?tscn=1484856066
Source: http://www.ark-survival.net/en/2015/07/09/rcon-tutorial/
Full script: https://www.ryanschulze.net/archives/1052
@UltimateByte commented on GitHub (Feb 23, 2017):
For Rust:
https://github.com/dcodeIO/WebRcon
@UltimateByte commented on GitHub (Feb 23, 2017):
Ideas on how to use RCON:
@dgibbs64 commented on GitHub (Oct 28, 2019):
The query will wait up to 60 seconds before triggering a reboot this has worked in preventing a server being restarting during a map change. Also a planned "send" command for servers that support entering commands into the console.
Part of this will need to be confirming which servers can use send and which can use RCON. send would be the priority and rcon secondary.
@sarahsturgeon commented on GitHub (Oct 28, 2019):
Garry's Mod would benefit from rcon commands - especially when doing things like running
stop. The way we pipe stuff into tmux right now isn't super reliable and could be avoided by using rcon. (This would also be a great way to query the server to decide if the server is actually running, as I believe the server can respond to status requests even while changing maps)@dgibbs64 commented on GitHub (Oct 20, 2023):
RCON support is choppy at best and varies greatly depending on the game server. Supporting a few game servers that all work very differently is a massive use of dev time. I don't see adding rcon support as viable unless there is a module similar to gamedig that is well supported (there are a few projects that seem pretty dead).
@github-actions[bot] commented on GitHub (Oct 21, 2024):
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.