mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #3006] jq: error (at <stdin>:0): Cannot iterate over null (null) #2142
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#2142
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 @Tiscan on GitHub (Aug 23, 2020).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/3006
User Story
When running ./sdtdserver I get the error messages:
jq: error (at :0): Cannot iterate over null (null)
jq: error (at :0): Cannot iterate over null (null)
Before the command executes.
Also the ./sdtserver monitor command fails as the port gets listed as 2690026900269052701527020 even though the port is configured and running as 26900.
I searched the jq error here and found one reference from a but it just said that it was set to be fixed many versions back. Also found a reference to the port issue but there was no resolution on that one.
Basic info
Further Information
Completely fresh OS & LGSM install as of a couple of days ago.
To Reproduce
Run any ./sdtdserver , monitor command errors via ./sdtdserver monitor
Expected behaviour
Successful execution of command without errors, monitor option detecting correct port.
I am attaching the results of a details command below as you can see both the jq error and the port incorrect. Happy to provide other logs / etc if someone can point me to what they need.
@issue-label-bot[bot] commented on GitHub (Aug 23, 2020):
Issue-Label Bot is automatically applying the label
type: bugto this issue, with a confidence of 0.95. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
@sapphirecz commented on GitHub (Aug 25, 2020):
I have the same issue with sdtdserver release A19 on Fedora. sdtdserver with the same version of LGSM but release A18.4 (installation was moved from CentOS few weeks ago) is on Fedora without this issue. I probably could test it on CentOS if necessary.
Here is postdetails pastebin https://termbin.com/iaug3
@pschiffe commented on GitHub (Aug 25, 2020):
Hello, I think I found the issue. There are numbers in the comment on the same line as the port number, see here:
github.com/GameServerManagers/LinuxGSM@7e3df5d434/lgsm/functions/info_config.sh (L125)@pschiffe commented on GitHub (Aug 25, 2020):
Sorry, wrong line, sdtd is here
github.com/GameServerManagers/LinuxGSM@7e3df5d434/lgsm/functions/info_config.sh (L1213)@Tiscan commented on GitHub (Aug 25, 2020):
Can confirm this is the issue.
I moved the comment to a line on it's own in sdtdserver.xml and neither error occurs anymore.
@pschiffe commented on GitHub (Aug 26, 2020):
The solution to this problem could be parsing xml files properly. There is an xmlstarlet package available in centos, fedora, debian and ubuntu (these I checked, it's probably elsewhere too), which can be used to extract xml values. For example in this case it looks like this:
The selector there says: give me
@valueattribute ofpropertywith attribute@name == "ServerPort".@Tiscan commented on GitHub (Aug 26, 2020):
Also confirmed that xmlstarlet works on my install. However this would add a new dependency to LGSM.
Seems like a good path though as there will bound to be additional instances where digits are outside of the actual XML attribute.
@h3o66 commented on GitHub (Aug 26, 2020):
Alternative:
put a egrep for the value in the original command:
The problem with a new dependency is here that only a few gameserver will need this.
@dgibbs64 commented on GitHub (Aug 26, 2020):
@h3o66 this would be the best solution to avoid another dependency. If you are happy too could you do a PR and I will merge
@h3o66 commented on GitHub (Aug 26, 2020):
done - see the connected pr
@github-actions[bot] commented on GitHub (Sep 21, 2021):
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.