[GH-ISSUE #3321] [BUG] Rust Server Updating - Server marked to restart erroneously #2290

Open
opened 2026-02-27 03:02:01 +03:00 by kerem · 4 comments
Owner

Originally created by @eastonch on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/3321

User Story

As a GS Admin, I want the update function to be aware of the server restart so that the following update function doesn't restart unnecessarily.

Basic info

  • Distro: [Ubuntu 18.04]
  • Game: Rust
  • Command: u / Update
  • LinuxGSM version: 21.1.3

Further Information

When performing regular updates using the ./rustserver update function and a new build is available, it will first stop the server, update the build and then restart the server with the new build. However the next update function will report that the server has not been restarted and thus restarts erroneously.

To Reproduce

Steps to reproduce the behaviour:

  1. Rust Server - Staging Branch
  2. Run Update Script when new build available and server is running.
  3. Allow build to update
  4. Observe server restarts with new build "[ WARN ] Updating rustserver: rustserver will be restarted" ... [ OK ] Starting rustserver: DEV Staging Branch"
  5. Perform update function again
  6. Observe the message [ INFO ] Updating rustserver: rustserver has not been restarted since last updat

Expected behaviour

Server should not need to restart twice after an update when the first update has applied the new build.
Use Case: Staging Branch with irregular updates, 30min cronjob to run update so that the server is never 30mins away from being up to date for players on the staging branch wanting to play.
This behaviour has not been tested on public stable branch but anticipate the functionality is the same within LGSM regardless of branch within configuration.

Please see below console output

rust-dev@DEV:~$ ./rustserver u
[  OK  ] Updating rustserver: Checking for update: SteamCMD

Update available
* Local build: 6313609
* Remote build: 6314803
* Branch: staging
https://steamdb.info/app/258550/

[ WARN ] Updating rustserver: rustserver will be restarted
[  OK  ] Stopping rustserver: Graceful: CTRL+c: 4: OK
[ START ] Updating rustserver: SteamCMD
Branch: staging
Redirecting stderr to '/home/rust-dev/.local/share/Steam/logs/stderr.txt'
/tmp/dumps is not owned by us - delete and recreate
Unable to delete /tmp/dumps. Continuing anyway.
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x61) downloading, progress: 0.00 (0 / 2803852337)
 Update state (0x61) downloading, progress: 0.35 (9860104 / 2803852337)
 Update state (0x61) downloading, progress: 0.45 (12631560 / 2803852337)
 Update state (0x61) downloading, progress: 16.25 (455512113 / 2803852337)
 Update state (0x61) downloading, progress: 31.37 (879494593 / 2803852337)
 Update state (0x61) downloading, progress: 48.87 (1370144549 / 2803852337)
 Update state (0x61) downloading, progress: 51.19 (1435180942 / 2803852337)
 Update state (0x61) downloading, progress: 60.19 (1687714007 / 2803852337)
 Update state (0x61) downloading, progress: 72.58 (2034924263 / 2803852337)
 Update state (0x61) downloading, progress: 76.48 (2144372007 / 2803852337)
 Update state (0x61) downloading, progress: 99.55 (2791186290 / 2803852337)
 Update state (0x61) downloading, progress: 100.00 (2803852337 / 2803852337)
Success! App '258550' fully installed.
Complete! Updating rustserver: SteamCMD
[  OK  ] Starting rustserver: DEV Staging Branch
rust-dev@DEV:~$ ./rustserver u
[ INFO ] Updating rustserver: rustserver has not been restarted since last updat                                                                                                                                                                                                                                             [  OK  ] Stopping rustserver: Graceful: CTRL+c: 5: OK
[  OK  ] Starting rustserver: DEV Staging Branch
Originally created by @eastonch on GitHub (Mar 2, 2021). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/3321 ## User Story As a GS Admin, I want the update function to be aware of the server restart so that the following update function doesn't restart unnecessarily. ## Basic info * **Distro:** [Ubuntu 18.04] * **Game:** Rust * **Command:** u / Update * **LinuxGSM version:** 21.1.3 ## Further Information When performing regular updates using the ./rustserver update function and a new build is available, it will first stop the server, update the build and then restart the server with the new build. However the next update function will report that the server has **not** been restarted and thus restarts erroneously. ## To Reproduce Steps to reproduce the behaviour: 1. Rust Server - Staging Branch 2. Run Update Script when new build available and server is running. 3. Allow build to update 4. Observe server restarts with new build "[ WARN ] Updating rustserver: rustserver will be restarted" ... [ OK ] Starting rustserver: DEV Staging Branch" 5. Perform update function again 6. Observe the message [ INFO ] Updating rustserver: rustserver has not been restarted since last updat ## Expected behaviour Server should not need to restart twice after an update when the first update has applied the new build. Use Case: Staging Branch with irregular updates, 30min cronjob to run update so that the server is never 30mins away from being up to date for players on the staging branch wanting to play. This behaviour has not been tested on public stable branch but anticipate the functionality is the same within LGSM regardless of branch within configuration. Please see below console output ``` rust-dev@DEV:~$ ./rustserver u [ OK ] Updating rustserver: Checking for update: SteamCMD Update available * Local build: 6313609 * Remote build: 6314803 * Branch: staging https://steamdb.info/app/258550/ [ WARN ] Updating rustserver: rustserver will be restarted [ OK ] Stopping rustserver: Graceful: CTRL+c: 4: OK [ START ] Updating rustserver: SteamCMD Branch: staging Redirecting stderr to '/home/rust-dev/.local/share/Steam/logs/stderr.txt' /tmp/dumps is not owned by us - delete and recreate Unable to delete /tmp/dumps. Continuing anyway. [ 0%] Checking for available updates... [----] Verifying installation... Steam Console Client (c) Valve Corporation -- type 'quit' to exit -- Loading Steam API...OK. Connecting anonymously to Steam Public...Logged in OK Waiting for user info...OK Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x61) downloading, progress: 0.00 (0 / 2803852337) Update state (0x61) downloading, progress: 0.35 (9860104 / 2803852337) Update state (0x61) downloading, progress: 0.45 (12631560 / 2803852337) Update state (0x61) downloading, progress: 16.25 (455512113 / 2803852337) Update state (0x61) downloading, progress: 31.37 (879494593 / 2803852337) Update state (0x61) downloading, progress: 48.87 (1370144549 / 2803852337) Update state (0x61) downloading, progress: 51.19 (1435180942 / 2803852337) Update state (0x61) downloading, progress: 60.19 (1687714007 / 2803852337) Update state (0x61) downloading, progress: 72.58 (2034924263 / 2803852337) Update state (0x61) downloading, progress: 76.48 (2144372007 / 2803852337) Update state (0x61) downloading, progress: 99.55 (2791186290 / 2803852337) Update state (0x61) downloading, progress: 100.00 (2803852337 / 2803852337) Success! App '258550' fully installed. Complete! Updating rustserver: SteamCMD [ OK ] Starting rustserver: DEV Staging Branch rust-dev@DEV:~$ ./rustserver u [ INFO ] Updating rustserver: rustserver has not been restarted since last updat [ OK ] Stopping rustserver: Graceful: CTRL+c: 5: OK [ OK ] Starting rustserver: DEV Staging Branch ```
Author
Owner

@dgibbs64 commented on GitHub (Mar 2, 2021):

This is odd behaviour.

The rustserver has not been restarted since last update functionality is designed for servers with multiple instances. to ensure all instances are restarted when updates occur.

As follows

./rustserver update >update found and game server restarts
./rustserver-2 monitor > monitor detects a recent update and triggers a restart. 

This will need to be investigated further

<!-- gh-comment-id:788824348 --> @dgibbs64 commented on GitHub (Mar 2, 2021): This is odd behaviour. The `rustserver has not been restarted since last update` functionality is designed for servers with multiple instances. to ensure all instances are restarted when updates occur. As follows ``` ./rustserver update >update found and game server restarts ./rustserver-2 monitor > monitor detects a recent update and triggers a restart. ```` This will need to be investigated further
Author
Owner

@eastonch commented on GitHub (Mar 2, 2021):

@dgibbs64 thanks for the quick response.

Can confirm that I do have multiple LGSM instances running but not configured like /rustserver-2, instead using separate users as per guide here: https://linuxgsm.com/lgsm/rustserver/

A total of four users configured this way, with 3 running actively. Updates would intended to be done individually vs all users undergoing the same update at the same time.

I did try looking through source but 4am wasn't being kind. I'll take another look to see if I can work this out and submit a PR if I do.

<!-- gh-comment-id:788840262 --> @eastonch commented on GitHub (Mar 2, 2021): @dgibbs64 thanks for the quick response. Can confirm that I do have multiple LGSM instances running but not configured like /rustserver-2, instead using separate users as per guide here: https://linuxgsm.com/lgsm/rustserver/ A total of four users configured this way, with 3 running actively. Updates would intended to be done individually vs all users undergoing the same update at the same time. I did try looking through source but 4am wasn't being kind. I'll take another look to see if I can work this out and submit a PR if I do.
Author
Owner

@dgibbs64 commented on GitHub (Mar 2, 2021):

Thanks. I welcome a PR on this. It will certainly speed up getting it resolved 💪

<!-- gh-comment-id:788861368 --> @dgibbs64 commented on GitHub (Mar 2, 2021): Thanks. I welcome a PR on this. It will certainly speed up getting it resolved 💪
Author
Owner

@Xalorous commented on GitHub (Mar 3, 2021):

Please note, this is an [INFO] tagged entry, not an error. (also there's a typo either in the paste or in the script)

[ INFO ] Updating rustserver: rustserver has not been restarted since last updat 

My thinking is that this message is intended to spur the admin to restart the gameserver. Because unless I'm mistaken, the updates will not be in use until that happens.

<!-- gh-comment-id:789403234 --> @Xalorous commented on GitHub (Mar 3, 2021): Please note, this is an `[INFO]` tagged entry, not an error. (also there's a typo either in the paste or in the script) [ INFO ] Updating rustserver: rustserver has not been restarted since last updat My thinking is that this message is intended to spur the admin to restart the gameserver. Because unless I'm mistaken, the updates will not be in use until that happens.
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2290
No description provided.