[GH-ISSUE #4222] [Bug]: Server hostname not displaying properly in scripts or alerts #2656

Closed
opened 2026-02-27 03:04:27 +03:00 by kerem · 13 comments
Owner

Originally created by @justaFluffypanda on GitHub (May 30, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4222

User story

As a server operator, I woud like the host name of my server be parsed correctly as to display properly in console output and discord alerts.

Game

CS:GO

Linux distro

Ubuntu 22.04

Command

command: start

Further information

Since the recent update when starting my CS:GO servers the server's name is not accurately parsed by LGSM and instead reports as "NOT SET." The "NOT SET" name also shows up on discord alerts. The server name displays correctly in-game and in gamedig queries so this is must be parsing issue within LGSM.

My Valheim server is functioning as normal, with the main difference being my CS:GO servers' names all begin with a '[' character which is possibly breaking whatever query is doing the parsing.

lgsm_bug1

lgsm_bug2

lgsm_bug3

Relevant log output

No response

Steps to reproduce

No response

Originally created by @justaFluffypanda on GitHub (May 30, 2023). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4222 ### User story As a server operator, I woud like the host name of my server be parsed correctly as to display properly in console output and discord alerts. ### Game CS:GO ### Linux distro Ubuntu 22.04 ### Command command: start ### Further information Since the recent update when starting my CS:GO servers the server's name is not accurately parsed by LGSM and instead reports as "NOT SET." The "NOT SET" name also shows up on discord alerts. The server name displays correctly in-game and in gamedig queries so this is must be parsing issue within LGSM. My Valheim server is functioning as normal, with the main difference being my CS:GO servers' names all begin with a '[' character which is possibly breaking whatever query is doing the parsing. ![lgsm_bug1](https://github.com/GameServerManagers/LinuxGSM/assets/58008171/f53ee2cc-9cc9-46a6-8255-75ab65361a93) ![lgsm_bug2](https://github.com/GameServerManagers/LinuxGSM/assets/58008171/93c6f67d-edf6-4996-9202-8bdd875fedcd) ![lgsm_bug3](https://github.com/GameServerManagers/LinuxGSM/assets/58008171/dc67203c-227f-4f39-b70d-c719c1bd113a) ### Relevant log output _No response_ ### Steps to reproduce _No response_
Author
Owner

@SylenThunder commented on GitHub (May 31, 2023):

To expand on this some, I see the same with an error in the 7 Days server.

/home/ageofdemons/lgsm/modules/info_game.sh: line 134: -: command not found
[ OK ] Starting sdtdserver: NOT SET

<!-- gh-comment-id:1569310790 --> @SylenThunder commented on GitHub (May 31, 2023): To expand on this some, I see the same with an error in the 7 Days server. /home/ageofdemons/lgsm/modules/**info_game.sh: line 134: -: command not found** [ OK ] Starting sdtdserver: NOT SET
Author
Owner

@ghost commented on GitHub (Jun 6, 2023):

xmlparser won't parse if space is in sdtdserver.xml

<!-- gh-comment-id:1578049398 --> @ghost commented on GitHub (Jun 6, 2023): xmlparser won't parse if space is in sdtdserver.xml
Author
Owner

@dgibbs64 commented on GitHub (Jun 6, 2023):

@xRuffKez can you provide an example of this so I can replicate it please,

<!-- gh-comment-id:1578162220 --> @dgibbs64 commented on GitHub (Jun 6, 2023): @xRuffKez can you provide an example of this so I can replicate it please,
Author
Owner

@ghost commented on GitHub (Jun 6, 2023):

@dgibbs64 On debian11 testet:

  1. Install required packets on a fresh system.
  2. Download lgsm and get sdtd with cli.
  3. Run sdtdserver with ai flag
  4. Start sdtdserver

You will see an error in the cli -: Command not found.
This happens while xmlparser cannot parse spaces in strings. E.g. "Linux Gameserver". It will output NOT SET.
If you configure sdtdserver.xml with "Linux_Gameserver" or "LinuxGameserver", xmlparser successfully completes parsing.

<!-- gh-comment-id:1578181387 --> @ghost commented on GitHub (Jun 6, 2023): @dgibbs64 On debian11 testet: 1. Install required packets on a fresh system. 2. Download lgsm and get sdtd with cli. 3. Run sdtdserver with ai flag 4. Start sdtdserver You will see an error in the cli -: Command not found. This happens while xmlparser cannot parse spaces in strings. E.g. "Linux Gameserver". It will output NOT SET. If you configure sdtdserver.xml with "Linux_Gameserver" or "LinuxGameserver", xmlparser successfully completes parsing.
Author
Owner

@dgibbs64 commented on GitHub (Jun 6, 2023):

@xRuffKez spot on, thanks. I will look at this and add to a hotfix

<!-- gh-comment-id:1578184612 --> @dgibbs64 commented on GitHub (Jun 6, 2023): @xRuffKez spot on, thanks. I will look at this and add to a hotfix
Author
Owner

@ghost commented on GitHub (Jun 6, 2023):

XMLLint version:
Screenshot_20230606_103624_Termius

<!-- gh-comment-id:1578192255 --> @ghost commented on GitHub (Jun 6, 2023): XMLLint version: ![Screenshot_20230606_103624_Termius](https://github.com/GameServerManagers/LinuxGSM/assets/92758042/3f39f457-e601-400b-b755-f4664e24daf6)
Author
Owner

@ghost commented on GitHub (Jun 6, 2023):

I investigated the Code and at fn_info_game_sdtd() spaces from config file sdtdserver.xml need to be escaped! Else the string won't be parsed by xmllint.

An untidy fix:
In function fn_info_game_sdtd() go under "fi" and edit the "NOT SET" to your liking.

<!-- gh-comment-id:1578666269 --> @ghost commented on GitHub (Jun 6, 2023): I investigated the Code and at fn_info_game_sdtd() spaces from config file sdtdserver.xml need to be escaped! Else the string won't be parsed by xmllint. An untidy fix: In function fn_info_game_sdtd() go under "fi" and edit the "NOT SET" to your liking.
Author
Owner

@dgibbs64 commented on GitHub (Jun 6, 2023):

thanks that will help when I take a look :)

<!-- gh-comment-id:1578668647 --> @dgibbs64 commented on GitHub (Jun 6, 2023): thanks that will help when I take a look :)
Author
Owner

@Pshock13 commented on GitHub (Jun 13, 2023):

Another work around looks like you can add &#160; instead of spaces to the name of your server. I think this might be a healthier work around than editing "NOT SET" as it should still work just fine once this bug is fixed.

ie. instead of "My Game Host" try "My&#160;Game&#160;Host"

<!-- gh-comment-id:1588369171 --> @Pshock13 commented on GitHub (Jun 13, 2023): Another work around looks like you can add `&#160;` instead of spaces to the name of your server. I think this might be a healthier work around than editing "NOT SET" as it should still work just fine once this bug is fixed. ie. instead of "`My Game Host`" try "`My&#160;Game&#160;Host`"
Author
Owner

@Pshock13 commented on GitHub (Jun 13, 2023):

I've also noticed an issue with server password as well that I think is due to the use of xmllint

When ServerPassword has a leading character that cannot be escaped in XML like a dollar sign($): value="$dollar"
./sdtdserver dt --> Server Password: NOT SET & Status: STOPPED

When ServerPassword has a non-escapable character elsewhere in the password: value="dol$lar"
./sdtdserver dt --> Server Password: dol & Status: STOPPED // the $ cuts off the password

When ServerPassword has a non-escapable at the end the password: value="dollar$"
./sdtdserver dt --> Server Password: dollar$ & Status: STOPPED //notice the $ shows up when it's at the end but still doesn't allow the server to start up

When ServerPassword has no special characters: value="dollar"
./sdtdserver dt --> Server Password: dollar & Status: STARTED

I'm sure there are other characters that won't work, I only noticed this because my password previously had a leading $ before I updated LGSM and it had worked fine before.

<!-- gh-comment-id:1588436710 --> @Pshock13 commented on GitHub (Jun 13, 2023): I've also noticed an issue with server password as well that I think is due to the use of xmllint When ServerPassword has a **_leading character_** that cannot be escaped in XML like a dollar sign($): `value="$dollar"` ./sdtdserver dt --> `Server Password: NOT SET` & `Status: STOPPED` When ServerPassword has a non-escapable character **_elsewhere_** in the password: `value="dol$lar"` ./sdtdserver dt --> `Server Password: dol` & `Status: STOPPED` // the $ cuts off the password When ServerPassword has a non-escapable **_at the end_** the password: `value="dollar$"` ./sdtdserver dt --> `Server Password: dollar$` & `Status: STOPPED` //notice the $ shows up when it's at the end but still doesn't allow the server to start up When ServerPassword has no special characters: `value="dollar"` ./sdtdserver dt --> `Server Password: dollar` & `Status: STARTED` I'm sure there are other characters that won't work, I only noticed this because my password previously had a leading $ before I updated LGSM and it had worked fine before.
Author
Owner

@Ankh- commented on GitHub (Jun 21, 2023):

Just a FYI, i had the same issues on my 7 days 2 Die host. Just did a check and found out that one of the dependencies got removed: libxml2-utils. Just reinstalled it and now everything works again.
The host is a LXC Debian 11 container on a Proxmox host

<!-- gh-comment-id:1600350553 --> @Ankh- commented on GitHub (Jun 21, 2023): Just a FYI, i had the same issues on my 7 days 2 Die host. Just did a check and found out that one of the dependencies got removed: libxml2-utils. Just reinstalled it and now everything works again. The host is a LXC Debian 11 container on a Proxmox host
Author
Owner

@dgibbs64 commented on GitHub (Aug 30, 2023):

I have replicated the issue with CS:GO and can confirm that anything with [ ] has an issue

<!-- gh-comment-id:1699888597 --> @dgibbs64 commented on GitHub (Aug 30, 2023): I have replicated the issue with CS:GO and can confirm that anything with `[ ] ` has an issue
Author
Owner

@github-actions[bot] commented on GitHub (Sep 16, 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.

<!-- gh-comment-id:2351845028 --> @github-actions[bot] commented on GitHub (Sep 16, 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.
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#2656
No description provided.