SOLVED: Project Zomboid: Cannot get fresh instance to start - error code 5 - port forwarding issue?

OS Name/Version: Debian 10

Product Name/Version: v2.4.0.10, built 27/10/2022 18:15

Problem Description:

LOG : Network , 1671101767142> 1,181,562,153> RakNet.Startup() return code: 5 (0 means success)
ERROR: General , 1671101767144> 1,181,562,155> Connection Startup Failed. Code: 5
ERROR: General , 1671101767144> 1,181,562,155> at zombie.core.raknet.UdpEngine.<init>(
ERROR: General , 1671101767144> 1,181,562,155> at
ERROR: General , 1671101767144> 1,181,562,155> at

Steps to reproduce:

  • Step 1
    Install fresh project zomboid instance, docker or without docker
  • Step 2
    Try to start gameserver and watch console for initial admin password prompt
  • Step 3
    Continue server start up until it fails with above error

Actions taken to resolve so far:
I have checked my IPtables ruleset and AMP has apparently opened the correct ports that are also configured for the instance. I think this is related to port forwarding, but can’t find any misconfiguration, the same ports that the project zomboid console shows before failing have been auto configured, I even tried to add the IPtables rules myself but that would not yield any change.
I have a bungeecord proxy running with three Minecraft instances which works well and I have never had any port forwarding problems with that, other services are running as well and my IPtables rules were sufficient for all of those.

Project zomboids console requests these ports (as configured for the instance):
Zomboid Steam Server started, ports 19133 and 19132 must be open on the router

The according iptables output for the current rules looks ok to me:

-A INPUT -p tcp -m tcp --dport 27015 -m comment --comment "AMP:project-zomboid01:GenericModule.App.RemoteAdminPort" -j ACCEPT
-A INPUT -p udp -m udp --dport 19133 -m comment --comment "AMP:project-zomboid01:GenericModule.App.ApplicationPort1" -j ACCEPT
-A INPUT -p tcp -m tcp --dport 2224 -m comment --comment "AMP:ProjectZomboid01:FileManagerPlugin.SFTP.SFTPPortNumber" -j ACCEPT
-A INPUT -p udp -m udp --dport 19132 -m comment --comment "AMP:ProjectZomboid01:GenericModule.App.Ports.$ApplicationPort1" -j ACCEPT

There are no applications running that would use the same ports, also no duplicate rules in iptables.

I have no experience with running a project zomboid server, so I am not sure what to look for, but all I could find by googling regarding this error code 5 seems to have been resolved by forwarding the correct ports.

Utilizing UPnP is not possible, as this is a vserver hosting provider and not my own hardware.

I have already tried setting up the PZ instance without docker to see if that is causing the problem, but that did not help either.

EDIT: woah… I totally forgot how to human in the initial post.
Hello community! I’d really appreciate some debugging help, but also wanted to say that I have been using AMP for 2 years now and have had a lot of fun with it! It’s a great management panel and overall awesome project! Love to see more templates coming in and development being pushed forwards on a steady schedule, it’s been a great ride so far :slight_smile:

Those iptables rules don’t look right to me. They look like a mix of old and new rules.

Try this. Under Configuration->Networking->Port Assignment Mode, change to Allow all except excluded.

Delete your PZ instance.

Under Configuration->Instance Deployment, click Fetch Latest.

Refresh your browser.

Then create a new instance.

1 Like

Thank you so much! Changing the port assignment mode did the trick!
I did not expect a solution so quickly, let alone a reply :slight_smile: