[GH-ISSUE #4256] [Bug]: Project Zomboid ip setting is incorrect, is ignored by server #2678

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

Originally created by @ddan39 on GitHub (Jul 4, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4256

User story

The ip setting in pzserver.cfg has 2 dashes in it, which is incorrect. The setting also defaults to 0.0.0.0 which is incorrect.

Game

Project Zomboid

Linux distro

Debian 12

Command

command: start

Further information

The ip setting in pzserver.cfg has 2 dashes in it, which is incorrect. The setting also defaults to 0.0.0.0 which is incorrect. The value "0.0.0.0" is indeed often used by linux programs to mean "listen/bind to all interfaces", but it seems Project Zomboid breaks for some unknown reason when you specify that. If you just don't specify the -ip option at all, it does that by default though.

Also kind of a duplicate of bug #3710 which was locked and converted to discussion #3711 https://github.com/GameServerManagers/LinuxGSM/discussions/3711 and the info below I posted there also:

hi, the fix mentioned above is not actually a fix. if you check the console log, you will see that the problem "goes away" because now the "--ip" option is an unknown option(since the correct option has only 1 dash, not 2) and the "0.0.0.0" option is then not an argument to that option, so is also recognized as an unknown option, causing the ip setting to just be ignored completed.

The problem is 0.0.0.0 is not an allowed value by the -ip option. The point of the -ip option is to allow binding to a specific ip/interface, instead of all. The default when the -ip option is not provided is to bind to all. I think the real fix here is to just comment out the ip setting and advise the person reading the config to add it only if need be, in which case it would not be 0.0.0.0.

We could probably further prove that it doesn't work by specifying a valid IP other than 0.0.0.0 and looking at netstat/ss that it doesn't bind to the IP, but I don't feel like wasting my time doing that... err, scratch that, let me just do it....

with default --ip and me setting ip= to my actual public ip, we see it still binds to 0.0.0.0 :

$ netstat -lpn46 | grep ProjectZom
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::27015                :::*                    LISTEN      72118/./ProjectZomb 
udp        0      0 0.0.0.0:16261           0.0.0.0:*                           72118/./ProjectZomb 
udp        0      0 0.0.0.0:16262           0.0.0.0:*                           72118/./ProjectZomb 
udp        0      0 0.0.0.0:53576           0.0.0.0:*                           72118/./ProjectZomb 

and now if i change it from --ip to -ip (i obviously changed part of my public IP, i guess you'll have to trust me here :P )

$ netstat -lpn46 | grep ProjectZom
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 158.69.XXX.XX:27015     :::*                    LISTEN      73757/./ProjectZomb 
udp        0      0 0.0.0.0:42109           0.0.0.0:*                           73757/./ProjectZomb 
udp        0      0 158.69.XXX.XX:16261     0.0.0.0:*                           73757/./ProjectZomb 
udp        0      0 158.69.XXX.XX:16262     0.0.0.0:*                           73757/./ProjectZomb 

Thanks again!

Relevant log output

$ cat logs_03-07/03-07-23_23-01-24_DebugLog-server.txt
[03-07-23 23:01:24.466] LOG  : General     , 1688425284466> 199,310,297> cachedir set to "/home/pzserver/Zomboid".
[03-07-23 23:01:24.544] LOG  : General     , 1688425284544> 199,310,374> version=41.78.16 demo=false.
[03-07-23 23:01:24.544] LOG  : General     , 1688425284544> 199,310,375> revision= date= time=.
[03-07-23 23:01:24.545] LOG  : General     , 1688425284545> 199,310,375> unknown option "--ip".
[03-07-23 23:01:24.545] LOG  : General     , 1688425284545> 199,310,375> unknown option "0.0.0.0".
[03-07-23 23:01:24.545] LOG  : General     , 1688425284545> 199,310,375> unknown option "-Xmx20480M".
[03-07-23 23:01:24.545] LOG  : General     , 1688425284545> 199,310,376> server name is "pzserver".
[03-07-23 23:01:24.546] LOG  : General     , 1688425284546> 199,310,376> checking server WorldVersion in map_t.bin.
[03-07-23 23:01:24.547] LOG  : General     , 1688425284547> 199,310,377> Loading networking libraries....
[03-07-23 23:01:24.547] LOG  : General     , 1688425284547> 199,310,378> Loading steam_api....
[03-07-23 23:01:24.548] LOG  : General     , 1688425284547> 199,310,378> Loading RakNet64....
[03-07-23 23:01:24.548] LOG  : General     , 1688425284548> 199,310,379> Loading ZNetJNI64....
[03-07-23 23:01:24.550] LOG  : Network     , 1688425284550> 199,310,380> [03-07-23 23:01:24.549] > ZNet: SetLogLevel 2.
[03-07-23 23:01:24.551] LOG  : Network     , 1688425284551> 199,310,381> [03-07-23 23:01:24.550] > ZNet: SteamAPI initialised successfully.
[03-07-23 23:01:24.551] LOG  : General     , 1688425284551> 199,310,381> SteamUtils initialised successfully.
[03-07-23 23:01:24.936] LOG  : General     , 1688425284936> 199,310,767> translator: language is EN.
[03-07-23 23:01:25.113] LOG  : General     , 1688425285113> 199,310,943> LightingFPS set to 15.
[03-07-23 23:01:25.127] LOG  : General     , 1688425285127> 199,310,957> reading /home/pzserver/Zomboid/Server/pzserver.ini.
[03-07-23 23:01:25.128] LOG  : General     , 1688425285128> 199,310,958> writing /home/pzserver/Zomboid/Server/pzserver.ini.
[03-07-23 23:01:25.137] LOG  : Network     , 1688425285137> 199,310,967> [03-07-23 23:01:25.137] > ZNet: SZombienet -> SZombienet: Init.
[03-07-23 23:01:25.185] LOG  : Network     , 1688425285185> 199,311,015> [03-07-23 23:01:25.185] > ZNet: SteamGameServer seems to be initialized.
[03-07-23 23:01:25.185] LOG  : Network     , 1688425285185> 199,311,016> [03-07-23 23:01:25.185] > ZNet: SZombienet -> SSteamSDK: SetMaxPlayerCount.
[03-07-23 23:01:25.187] LOG  : General     , 1688425285187> 199,311,017> Waiting for response from Steam servers.
[03-07-23 23:01:26.890] LOG  : Network     , 1688425286890> 199,312,720> [03-07-23 23:01:26.890] > ZNet: SSteamSDK -> SZombienet: OnSteamServersConnected.
[03-07-23 23:01:26.891] LOG  : Network     , 1688425286891> 199,312,721> [03-07-23 23:01:26.890] > ZNet: OnSteamServersConnected.
[03-07-23 23:01:26.891] LOG  : Network     , 1688425286891> 199,312,722> [03-07-23 23:01:26.891] > ZNet: SZombienet -> SSteamSDK: SetMaxPlayerCount.
[03-07-23 23:01:26.892] LOG  : Network     , 1688425286892> 199,312,722> [03-07-23 23:01:26.892] > ZNet: Public IP: XXXXXXXXXXX
[03-07-23 23:01:26.896] LOG  : General     , 1688425286895> 199,312,726> Start making backup to: /home/pzserver/Zomboid/backups/startup.
[03-07-23 23:01:27.578] LOG  : General     , 1688425287578> 199,313,408> compressionElapsed=314ms, mergingElapsed=360ms.
[03-07-23 23:01:27.661] LOG  : General     , 1688425287661> 199,313,492> Backup made in 764 ms.
[03-07-23 23:01:27.664] LOG  : General     , 1688425287664> 199,313,494> user database "/home/pzserver/Zomboid/db/pzserver.db".
[03-07-23 23:01:27.746] LOG  : Network     , 1688425287746> 199,313,576> Initialising Server Systems....
[03-07-23 23:01:28.308] LOG  : Lua         , 1688425288308> 199,314,139> Loading: media/lua/shared/Sandbox/Apocalypse.lua.
[03-07-23 23:01:29.282] LOG  : General     , 1688425289282> 199,315,112> scriptChecksum: 65f5e46ef1be089d5adca89001729e9c.
[03-07-23 23:01:29.288] WARN : Recipe      , 1688425289288> 199,315,118> RecipeManager.resolveItemModuleDotType> WARNING: module "Base" may have forgot to import module Base.
[03-07-23 23:01:29.292] WARN : Script      , 1688425289292> 199,315,123> ModelScript.check> no such model "null" for Base.BareHands.
[03-07-23 23:01:29.293] WARN : Script      , 1688425289293> 199,315,123> ModelScript.check> no such model "???.DisposableRazor" for Base.Razor.
[03-07-23 23:01:29.299] WARN : Script      , 1688425289299> 199,315,129> ModelScript.check> no such model "Chainsaw" for Base.Chainsaw.
[03-07-23 23:01:29.706] LOG  : General     , 1688425289706> 199,315,536> LOADING ASSETS: START.
[03-07-23 23:01:36.411] LOG  : General     , 1688425296410> 199,322,241> LOADING ASSETS: FINISH.

Steps to reproduce

  1. start pzserver
  2. observe log that says the "--ip" and "0.0.0.0" options are unknown
Originally created by @ddan39 on GitHub (Jul 4, 2023). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4256 ### User story The ip setting in pzserver.cfg has 2 dashes in it, which is incorrect. The setting also defaults to 0.0.0.0 which is incorrect. ### Game Project Zomboid ### Linux distro Debian 12 ### Command command: start ### Further information The ip setting in pzserver.cfg has 2 dashes in it, which is incorrect. The setting also defaults to 0.0.0.0 which is incorrect. The value "0.0.0.0" is indeed often used by linux programs to mean "listen/bind to all interfaces", but it seems Project Zomboid breaks for some unknown reason when you specify that. If you just don't specify the -ip option at all, it does that by default though. Also kind of a duplicate of bug #3710 which was locked and converted to discussion #3711 https://github.com/GameServerManagers/LinuxGSM/discussions/3711 and the info below I posted there also: hi, the fix mentioned above is not actually a fix. if you check the console log, you will see that the problem "goes away" because now the "--ip" option is an unknown option(since the correct option has only 1 dash, not 2) and the "0.0.0.0" option is then not an argument to that option, so is also recognized as an unknown option, causing the ip setting to just be ignored completed. The problem is 0.0.0.0 is not an allowed value by the -ip option. The point of the -ip option is to allow binding to a specific ip/interface, instead of all. The default when the -ip option is not provided is to bind to all. I think the real fix here is to just comment out the ip setting and advise the person reading the config to add it only if need be, in which case it would not be 0.0.0.0. We could probably further prove that it doesn't work by specifying a valid IP other than 0.0.0.0 and looking at netstat/ss that it doesn't bind to the IP, but I don't feel like wasting my time doing that... err, scratch that, let me just do it.... with default --ip and me setting ip= to my actual public ip, we see it still binds to 0.0.0.0 : ``` $ netstat -lpn46 | grep ProjectZom (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 :::27015 :::* LISTEN 72118/./ProjectZomb udp 0 0 0.0.0.0:16261 0.0.0.0:* 72118/./ProjectZomb udp 0 0 0.0.0.0:16262 0.0.0.0:* 72118/./ProjectZomb udp 0 0 0.0.0.0:53576 0.0.0.0:* 72118/./ProjectZomb ``` and now if i change it from --ip to -ip (i obviously changed part of my public IP, i guess you'll have to trust me here :P ) ``` $ netstat -lpn46 | grep ProjectZom (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 158.69.XXX.XX:27015 :::* LISTEN 73757/./ProjectZomb udp 0 0 0.0.0.0:42109 0.0.0.0:* 73757/./ProjectZomb udp 0 0 158.69.XXX.XX:16261 0.0.0.0:* 73757/./ProjectZomb udp 0 0 158.69.XXX.XX:16262 0.0.0.0:* 73757/./ProjectZomb ``` Thanks again! ### Relevant log output ```shell $ cat logs_03-07/03-07-23_23-01-24_DebugLog-server.txt [03-07-23 23:01:24.466] LOG : General , 1688425284466> 199,310,297> cachedir set to "/home/pzserver/Zomboid". [03-07-23 23:01:24.544] LOG : General , 1688425284544> 199,310,374> version=41.78.16 demo=false. [03-07-23 23:01:24.544] LOG : General , 1688425284544> 199,310,375> revision= date= time=. [03-07-23 23:01:24.545] LOG : General , 1688425284545> 199,310,375> unknown option "--ip". [03-07-23 23:01:24.545] LOG : General , 1688425284545> 199,310,375> unknown option "0.0.0.0". [03-07-23 23:01:24.545] LOG : General , 1688425284545> 199,310,375> unknown option "-Xmx20480M". [03-07-23 23:01:24.545] LOG : General , 1688425284545> 199,310,376> server name is "pzserver". [03-07-23 23:01:24.546] LOG : General , 1688425284546> 199,310,376> checking server WorldVersion in map_t.bin. [03-07-23 23:01:24.547] LOG : General , 1688425284547> 199,310,377> Loading networking libraries.... [03-07-23 23:01:24.547] LOG : General , 1688425284547> 199,310,378> Loading steam_api.... [03-07-23 23:01:24.548] LOG : General , 1688425284547> 199,310,378> Loading RakNet64.... [03-07-23 23:01:24.548] LOG : General , 1688425284548> 199,310,379> Loading ZNetJNI64.... [03-07-23 23:01:24.550] LOG : Network , 1688425284550> 199,310,380> [03-07-23 23:01:24.549] > ZNet: SetLogLevel 2. [03-07-23 23:01:24.551] LOG : Network , 1688425284551> 199,310,381> [03-07-23 23:01:24.550] > ZNet: SteamAPI initialised successfully. [03-07-23 23:01:24.551] LOG : General , 1688425284551> 199,310,381> SteamUtils initialised successfully. [03-07-23 23:01:24.936] LOG : General , 1688425284936> 199,310,767> translator: language is EN. [03-07-23 23:01:25.113] LOG : General , 1688425285113> 199,310,943> LightingFPS set to 15. [03-07-23 23:01:25.127] LOG : General , 1688425285127> 199,310,957> reading /home/pzserver/Zomboid/Server/pzserver.ini. [03-07-23 23:01:25.128] LOG : General , 1688425285128> 199,310,958> writing /home/pzserver/Zomboid/Server/pzserver.ini. [03-07-23 23:01:25.137] LOG : Network , 1688425285137> 199,310,967> [03-07-23 23:01:25.137] > ZNet: SZombienet -> SZombienet: Init. [03-07-23 23:01:25.185] LOG : Network , 1688425285185> 199,311,015> [03-07-23 23:01:25.185] > ZNet: SteamGameServer seems to be initialized. [03-07-23 23:01:25.185] LOG : Network , 1688425285185> 199,311,016> [03-07-23 23:01:25.185] > ZNet: SZombienet -> SSteamSDK: SetMaxPlayerCount. [03-07-23 23:01:25.187] LOG : General , 1688425285187> 199,311,017> Waiting for response from Steam servers. [03-07-23 23:01:26.890] LOG : Network , 1688425286890> 199,312,720> [03-07-23 23:01:26.890] > ZNet: SSteamSDK -> SZombienet: OnSteamServersConnected. [03-07-23 23:01:26.891] LOG : Network , 1688425286891> 199,312,721> [03-07-23 23:01:26.890] > ZNet: OnSteamServersConnected. [03-07-23 23:01:26.891] LOG : Network , 1688425286891> 199,312,722> [03-07-23 23:01:26.891] > ZNet: SZombienet -> SSteamSDK: SetMaxPlayerCount. [03-07-23 23:01:26.892] LOG : Network , 1688425286892> 199,312,722> [03-07-23 23:01:26.892] > ZNet: Public IP: XXXXXXXXXXX [03-07-23 23:01:26.896] LOG : General , 1688425286895> 199,312,726> Start making backup to: /home/pzserver/Zomboid/backups/startup. [03-07-23 23:01:27.578] LOG : General , 1688425287578> 199,313,408> compressionElapsed=314ms, mergingElapsed=360ms. [03-07-23 23:01:27.661] LOG : General , 1688425287661> 199,313,492> Backup made in 764 ms. [03-07-23 23:01:27.664] LOG : General , 1688425287664> 199,313,494> user database "/home/pzserver/Zomboid/db/pzserver.db". [03-07-23 23:01:27.746] LOG : Network , 1688425287746> 199,313,576> Initialising Server Systems.... [03-07-23 23:01:28.308] LOG : Lua , 1688425288308> 199,314,139> Loading: media/lua/shared/Sandbox/Apocalypse.lua. [03-07-23 23:01:29.282] LOG : General , 1688425289282> 199,315,112> scriptChecksum: 65f5e46ef1be089d5adca89001729e9c. [03-07-23 23:01:29.288] WARN : Recipe , 1688425289288> 199,315,118> RecipeManager.resolveItemModuleDotType> WARNING: module "Base" may have forgot to import module Base. [03-07-23 23:01:29.292] WARN : Script , 1688425289292> 199,315,123> ModelScript.check> no such model "null" for Base.BareHands. [03-07-23 23:01:29.293] WARN : Script , 1688425289293> 199,315,123> ModelScript.check> no such model "???.DisposableRazor" for Base.Razor. [03-07-23 23:01:29.299] WARN : Script , 1688425289299> 199,315,129> ModelScript.check> no such model "Chainsaw" for Base.Chainsaw. [03-07-23 23:01:29.706] LOG : General , 1688425289706> 199,315,536> LOADING ASSETS: START. [03-07-23 23:01:36.411] LOG : General , 1688425296410> 199,322,241> LOADING ASSETS: FINISH. ``` ### Steps to reproduce 1. start pzserver 2. observe log that says the "--ip" and "0.0.0.0" options are unknown
Author
Owner

@dgibbs64 commented on GitHub (Sep 4, 2023):

I have removed the --ip setting as looks like its no longer required

<!-- gh-comment-id:1705699288 --> @dgibbs64 commented on GitHub (Sep 4, 2023): I have removed the --ip setting as looks like its no longer required
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:2351844911 --> @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#2678
No description provided.