-
-
Notifications
You must be signed in to change notification settings - Fork 842
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]: Can't stop Rust server gracefully #4720
Comments
Glad someone submitted this. Kept getting told I was doing it wrong even though I had tried every stop mode I thought made sense. |
I am unsure on how to resolve this as LinuxGSM does not have RCON access to servers and Rust does not have an interactive console which we somtimes use. Different game servers have very different RCON protocols or none at all which adds a lot of complexity as I would need to add bespoke support for different game servers. Most game servers typically can handle graceful shutdown when CTRL+c or equivalent is triggered. I only found 1 previous issue highlighting a similar issue but was closed due to inactivity. It would be great to get some input from other Rust admins to see if they also experience a similar issue and how they resolve it. If there are any suggestions I am happy to look at implementing if practical to do so. |
May need to use an RCON client like this that can run from command line. I haven’t tried it yet. fieu/phust: Send RCON commands to your Rust server via the command-line ⛏github.comIf LGSM has an option to supply a custom stop command, that could help, maybe? Or try including the above client Sent from my iPhoneOn Mar 12, 2025, at 11:42 AM, Daniel Gibbs ***@***.***> wrote:
I am unsure on how to resolve this as LinuxGSM does not have RCON access to servers and Rust does not have an interactive console which we somtimes use. Different game servers have very different RCON protocols or none at all which adds a lot of complexity as I would need to add bespoke support for different game servers. Most game servers typically can handle graceful shutdown when CTRL+c or equivalent is triggered.
I only found 1 previous issue highlighting a similar issue but was closed due to inactivity. It would be great to get some input from other Rust admins to see if they also experience a similar issue and how they resolve it. If there are any suggestions I am happy to look at implementing if practical to do so.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
dgibbs64 left a comment (GameServerManagers/LinuxGSM#4720)
I am unsure on how to resolve this as LinuxGSM does not have RCON access to servers and Rust does not have an interactive console which we somtimes use. Different game servers have very different RCON protocols or none at all which adds a lot of complexity as I would need to add bespoke support for different game servers. Most game servers typically can handle graceful shutdown when CTRL+c or equivalent is triggered.
I only found 1 previous issue highlighting a similar issue but was closed due to inactivity. It would be great to get some input from other Rust admins to see if they also experience a similar issue and how they resolve it. If there are any suggestions I am happy to look at implementing if practical to do so.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Rust's RCON protocol is pretty simple. I've been able to write C++ apps that talk with it just by using a websocket library combined with a JSON library.
|
I have a bash script using https://github.com/fieu/phust for rcon commands, it requires PHP though. I am wondering how I can use it for graceful shutdown, any place where I can hook that in? Maybe create my own stopmode or something? |
So I added another stopmode and used my script, I tested it, it works quite well. https://github.com/atomy/LinuxGSM/pull/1/files However, the rcon tool I am using is not that great, it should probably be changed to https://github.com/gorcon/rcon-cli |
User story
As a rust server owner, I need LGSM to stop the server via a
quit
RCON command to trigger a clean save on exitGame
Rust
Linux distro
Ubuntu 24.04
Command
command: stop
Further information
LGSM's default
stopmode
for Rust is CTRL+C, which causes a hard shutdown that tends to have nasty side effects like forgetting teams, because the server doesn't get a chance to generate a full save.Changing
stopmode
toquit
results in failure, apparently because LGSM tries to send it to the server console instead of via RCON.Relevant log output
The text was updated successfully, but these errors were encountered: