[GH-ISSUE #390] [TF2] Checking for updates via parsing server log fails with a syntax error #321

Closed
opened 2026-02-27 02:00:50 +03:00 by kerem · 8 comments
Owner

Originally created by @athairus on GitHub (May 17, 2015).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/390

tf2server@athair:~$ ./tf2server restart
[  OK  ] Stopping tf2-server: Team Fortress 2
[ .... ] Update tf2-server: Checking for update
[  OK  ] Update tf2-server: Checking for update: Server logsgrep: /home/tf2server/log/console/tf2-server-console.log: No such file or directory

/home/tf2server/functions/fn_update_check: line 77: [: : integer expression expected
[  OK  ] Update tf2-server: Checking for update: Server logs: No update requested
[  OK  ] Update tf2-server: Checking for update: SteamCMD

No update available:
        Current version: 606753
        Available version: 606753
        https://steamdb.info/app/232250/

[  OK  ] Update tf2-server: No update available
[  OK  ] Starting tf2-server: Team Fortress 2

When I first ran the script, I believe the file wasn't even there (it's looking for a log without any time/date info in the name?), so I made it:
touch log/console/tf2-server-console.log

Its contents as of right now, many many restarts later:

tf2server@athair:~$ cat log/console/tf2-server-console.log
Console logging disabled: Bug in tmux 1.8 breaks logging
Currently installed: tmux 1.8

This is the command it generated and tried to execute:
grep -Ec "MasterRequestRestart" "/home/tf2server/log/console/tf2-server-console.log"

Running it directly in the terminal gives the proper output:
0

Something about the context the script executes in must keep it from running properly?

Originally created by @athairus on GitHub (May 17, 2015). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/390 ``` tf2server@athair:~$ ./tf2server restart [ OK ] Stopping tf2-server: Team Fortress 2 [ .... ] Update tf2-server: Checking for update [ OK ] Update tf2-server: Checking for update: Server logsgrep: /home/tf2server/log/console/tf2-server-console.log: No such file or directory /home/tf2server/functions/fn_update_check: line 77: [: : integer expression expected [ OK ] Update tf2-server: Checking for update: Server logs: No update requested [ OK ] Update tf2-server: Checking for update: SteamCMD No update available: Current version: 606753 Available version: 606753 https://steamdb.info/app/232250/ [ OK ] Update tf2-server: No update available [ OK ] Starting tf2-server: Team Fortress 2 ``` When I first ran the script, I believe the file wasn't even there (it's looking for a log without any time/date info in the name?), so I made it: `touch log/console/tf2-server-console.log` Its contents as of right now, many many restarts later: ``` tf2server@athair:~$ cat log/console/tf2-server-console.log Console logging disabled: Bug in tmux 1.8 breaks logging Currently installed: tmux 1.8 ``` This is the command it generated and tried to execute: `grep -Ec "MasterRequestRestart" "/home/tf2server/log/console/tf2-server-console.log"` Running it directly in the terminal gives the proper output: `0` Something about the context the script executes in must keep it from running properly?
kerem 2026-02-27 02:00:50 +03:00
  • closed this issue
  • added the
    type: bug
    label
Author
Owner

@dgibbs64 commented on GitHub (May 19, 2015):

Please delete the functions dir and try again. I might of fixed this

<!-- gh-comment-id:103666358 --> @dgibbs64 commented on GitHub (May 19, 2015): Please delete the functions dir and try again. I might of fixed this
Author
Owner

@athairus commented on GitHub (May 19, 2015):

Just wiped functions/ and tried again. Issue is still there...

<!-- gh-comment-id:103669588 --> @athairus commented on GitHub (May 19, 2015): Just wiped `functions/` and tried again. Issue is still there...
Author
Owner

@dgibbs64 commented on GitHub (May 19, 2015):

thanks. I will keep working on this

<!-- gh-comment-id:103673110 --> @dgibbs64 commented on GitHub (May 19, 2015): thanks. I will keep working on this
Author
Owner

@athairus commented on GitHub (May 19, 2015):

It's there, check my OP. Running the command from the terminal works just fine, but the script trips up on it for some reason that must have to do with the environment of the script.

<!-- gh-comment-id:103674252 --> @athairus commented on GitHub (May 19, 2015): It's there, check my OP. Running the command from the terminal works just fine, but the script trips up on it for some reason that must have to do with the environment of the script.
Author
Owner

@dgibbs64 commented on GitHub (May 19, 2015):

Yeah im not sure myself as im unable to replicate. Can you post the output of details (remove passwords etc) so I can test on a similar system.

<!-- gh-comment-id:103674607 --> @dgibbs64 commented on GitHub (May 19, 2015): Yeah im not sure myself as im unable to replicate. Can you post the output of details (remove passwords etc) so I can test on a similar system.
Author
Owner

@athairus commented on GitHub (May 19, 2015):

I'll do you one better, send me an RSA public key in the format sshd recognizes (ssh-rsa XXXXXXXXXXXXXX...........) and I'll let you log in and poke around. I'll scrub passwords now.

<!-- gh-comment-id:103675740 --> @athairus commented on GitHub (May 19, 2015): I'll do you one better, send me an RSA public key in the format sshd recognizes (`ssh-rsa XXXXXXXXXXXXXX...........`) and I'll let you log in and poke around. I'll scrub passwords now.
Author
Owner

@athairus commented on GitHub (May 20, 2015):

Okay, I can't wait much longer, thought you'd see this message tonight... here's the output from details:

tf2server@athair:~$ ./tf2server details

Distro Details
========================================================================================================================================================================================================
Distro:    Ubuntu 14.04.2 LTS
Arch:      x86_64
Kernel:    3.13.0-52-generic
Hostname:  athair.us
tmux:      tmux 1.8
GLIBC:     2.19

Performance
========================================================================================================================================================================================================
Uptime:    0d, 4h, 47m
Avg Load:  0.36, 0.25, 0.20

Mem:       total   used   free
Physical:  994M    922M   71M
Swap:      0B      0B     0B

Disk Usage
========================================================================================================================================================================================================
Disk available:  8.3G
Serverfiles:     14G

Team Fortress 2 Server Details
========================================================================================================================================================================================================
Server name:    CONFIG FILE MISSING!
Server IP:      XXX:27015
RCON password:  CONFIG FILE MISSING!
Status:         ONLINE

Service name:  tf2-server
User:          tf2server
Location:      /home/tf2server
Config file:   /home/tf2server/serverfiles/tf/cfg/tf2-server.cfg CONFIG FILE MISSING!!

Backups
========================================================================================================================================================================================================
No Backups created

Command-line Parameters
========================================================================================================================================================================================================
./srcds_run -game tf -maxplayers 24 -strictportbind -ip XXX -port 27015 +clientport 27005 +exec athairus/sourcetv.cfg +sv_pure 0 +tv_port 27020 +servercfgfile tf2-server.cfg -replay +map pl_badwater

Ports
========================================================================================================================================================================================================
Change ports by editing the command-line
parameters in tf2server.

Useful port diagnostic command:
netstat -atunp | grep srcds_linux

DESCRIPTION  DIRECTION  PORT   PROTOCOL
> Game/RCON  INBOUND    27015  tcp/udp
> SourceTV   INBOUND    27020  udp
< Client     OUTBOUND   27005  udp

Status: ONLINE

<!-- gh-comment-id:103734220 --> @athairus commented on GitHub (May 20, 2015): Okay, I can't wait much longer, thought you'd see this message tonight... here's the output from details: ``` tf2server@athair:~$ ./tf2server details Distro Details ======================================================================================================================================================================================================== Distro: Ubuntu 14.04.2 LTS Arch: x86_64 Kernel: 3.13.0-52-generic Hostname: athair.us tmux: tmux 1.8 GLIBC: 2.19 Performance ======================================================================================================================================================================================================== Uptime: 0d, 4h, 47m Avg Load: 0.36, 0.25, 0.20 Mem: total used free Physical: 994M 922M 71M Swap: 0B 0B 0B Disk Usage ======================================================================================================================================================================================================== Disk available: 8.3G Serverfiles: 14G Team Fortress 2 Server Details ======================================================================================================================================================================================================== Server name: CONFIG FILE MISSING! Server IP: XXX:27015 RCON password: CONFIG FILE MISSING! Status: ONLINE Service name: tf2-server User: tf2server Location: /home/tf2server Config file: /home/tf2server/serverfiles/tf/cfg/tf2-server.cfg CONFIG FILE MISSING!! Backups ======================================================================================================================================================================================================== No Backups created Command-line Parameters ======================================================================================================================================================================================================== ./srcds_run -game tf -maxplayers 24 -strictportbind -ip XXX -port 27015 +clientport 27005 +exec athairus/sourcetv.cfg +sv_pure 0 +tv_port 27020 +servercfgfile tf2-server.cfg -replay +map pl_badwater Ports ======================================================================================================================================================================================================== Change ports by editing the command-line parameters in tf2server. Useful port diagnostic command: netstat -atunp | grep srcds_linux DESCRIPTION DIRECTION PORT PROTOCOL > Game/RCON INBOUND 27015 tcp/udp > SourceTV INBOUND 27020 udp < Client OUTBOUND 27005 udp Status: ONLINE ```
Author
Owner

@lock[bot] commented on GitHub (Jul 19, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406350162 --> @lock[bot] commented on GitHub (Jul 19, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
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#321
No description provided.