Some instances not listening on ports

OS Name/Version: Ubuntu Server 20.04.6

Product Name/Version: v2.4.4, built 17/05/2023 17:54

Problem Description: Some instances game servers will not start listening on their given port. I thought this was a port forwarding / routing issue but digging deeper it seems it is at the application level with the servers not listening. Mainly focusing on Minecraft Bedrock, but I’m seeing some others with the same issue. All of them were working fine for months, I’m not sure when they stopped though. No changes other than some amp updates happened since they were working. This is an Ubuntu Server VM only running AMP. Only a java edition server and Bedrock server are running for this command. They are both started and servers running. For problematic ones, in this case Bedrock, I am able to connect with the local ip to confirm it is in fact running. Server logs do not show any issues.

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:2223            0.0.0.0:*               LISTEN      71392/AMP_Linux_x86 
tcp        0      0 0.0.0.0:2224            0.0.0.0:*               LISTEN      72677/AMP_Linux_x86 
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      71392/AMP_Linux_x86 
tcp        0      0 127.0.0.1:8081          0.0.0.0:*               LISTEN      72677/AMP_Linux_x86 
tcp        0      0 0.0.0.0:2225            0.0.0.0:*               LISTEN      71583/AMP_Linux_x86 
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      71583/AMP_Linux_x86 
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      58630/systemd-resol 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      56918/sshd: /usr/sb 
tcp6       0      0 :::25567                :::*                    LISTEN      71663/java          
tcp6       0      0 :::22                   :::*                    LISTEN      56918/sshd: /usr/sb 
udp        0      0 127.0.0.53:53           0.0.0.0:*                           58630/systemd-resol 
udp        0      0 192.168.1.46:68         0.0.0.0:*                           58614/systemd-netwo 
udp        0      0 0.0.0.0:35018           0.0.0.0:*                           77263/bedrock_serve 
udp        0      0 0.0.0.0:19132           0.0.0.0:*                           77263/bedrock_serve 
udp        0      0 0.0.0.0:12820           0.0.0.0:*                           71392/AMP_Linux_x86 
udp6       0      0 :::33505                :::*                                77263/bedrock_serve 
udp6       0      0 :::19133                :::*                                77263/bedrock_serve  

You can see at near the bottom 0.0.0.0:19132 is not listening for Minecraft Bedrock currently. The java Minecraft server is listening and working fine up on 25567. Even shutting down/modifying port on that java instance and changing Bedrock to use 25567 it does not start to listen. sudo ufw status returns inactive for the firewall. I know enough to do some troubleshooting but I’m not an expert here so I could be missing something simple.

Actions taken to resolve so far: Update / Upgrade and updated all instances with -nocache. Restarted problematic instances many times. Restarted VM. Bare metal box has even been rebooted for something else since I’ve been troubleshooting this issue.

Use ampinstmgr ports to check what’s listening rather than netstat.

That shows it is listening. So now I’m even more confused what the issue is.

[Info] Instance is currently running.
[Info] LISTENING        8081    TCP     (Core.Webserver.Port)
[Info] LISTENING        2224    TCP     (FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] LISTENING        19132   Both    (MinecraftModule.Minecraft.PortNumber)

Does ampinstmgr dumpfirewall (May require root) show that the required ports are open in the system firewall?

No rules to display.

[Info] AMP Instance Manager v2.4.3.6 built 07/05/2023 12:05
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Using UFW firewall.
[Info] No firewall rules to display.

When I was assuming this was a port forwarding issue I had tried the same changing this Bedrock server to use 25567 which was known working and forwarded to the same VM running AMP with no luck.

Is the output the same as root? What’s the output of ufw status?

I forgot sudo on that last run. Here is the results of sudo ampinstmgr dumpfirewall from the primary user account. I haven’t set a password for root.

Sudo ufw status returns inactive.

[Info] AMP Instance Manager v2.4.3.6 built 07/05/2023 12:05
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Using iptables firewall.
[Info] TCP/2223 (AMP:ADS01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/12820 (AMP:ADS01:ADSModule.Network.MetricsServerPort)
[Info] TCP/2224 (AMP:MinecraftBedrock01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2225 (AMP:MinecraftDirewolf01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2226 (AMP:Satisfactory-Docker01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2227 (AMP:Valheim01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2228 (AMP:Factorio01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/34197 (AMP:Factorio01:FactorioModule.Startup.Port)
[Info] TCP/7778 (AMP:Factorio01:FactorioModule.Startup.RCONPort)
[Info] TCP/2229 (AMP:MinecraftDirewolf11601:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2230 (AMP:MinecraftAllTheMods601:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2231 (AMP:Terraria01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2232 (AMP:VRising01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/9876 (AMP:VRising01:GenericModule.App.Ports.$ApplicationPort1)
[Info] UDP/9877 (AMP:VRising01:GenericModule.App.Ports.$ApplicationPort2)
[Info] TCP/25575 (AMP:VRising01:GenericModule.App.Ports.$RemoteAdminPort)
[Info] TCP/2233 (AMP:ProjectZomboid01:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] UDP/16261 (AMP:ProjectZomboid01:GenericModule.App.Ports.$ApplicationPort1)
[Info] UDP/16262 (AMP:ProjectZomboid01:GenericModule.App.Ports.$ApplicationPort2)
[Info] TCP/27015 (AMP:ProjectZomboid01:GenericModule.App.Ports.$RemoteAdminPort)
[Info] TCP/2234 (AMP:MinecraftDirewolf11901:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/2235 (AMP:AllTheMods801:FileManagerPlugin.SFTP.SFTPPortNumber)
[Info] TCP/7777 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort1)
[Info] UDP/7777 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort1)
[Info] TCP/15000 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort2)
[Info] UDP/15000 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort2)
[Info] TCP/15777 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort3)
[Info] UDP/15777 (AMP:Satisfactory-Docker01:GenericModule.App.ApplicationPort3)
[Info] TCP/2456 (AMP:Valheim01:GenericModule.App.ApplicationPort1)
[Info] UDP/2456 (AMP:Valheim01:GenericModule.App.ApplicationPort1)
[Info] TCP/2457 (AMP:Valheim01:GenericModule.App.ApplicationPort2)
[Info] UDP/2457 (AMP:Valheim01:GenericModule.App.ApplicationPort2)
[Info] TCP/25570 (AMP:MinecraftDirewolf11601:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25570 (AMP:MinecraftDirewolf11601:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/25566 (AMP:MinecraftAllTheMods601:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25566 (AMP:MinecraftAllTheMods601:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/7779 (AMP:Terraria01:GenericModule.App.ApplicationPort1)
[Info] UDP/7779 (AMP:Terraria01:GenericModule.App.ApplicationPort1)
[Info] TCP/25568 (AMP:MinecraftDirewolf11901:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25568 (AMP:MinecraftDirewolf11901:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/25571 (AMP:AllTheMods801:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25571 (AMP:AllTheMods801:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/25567 (AMP:MinecraftDirewolf01:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/25567 (AMP:MinecraftDirewolf01:MinecraftModule.Minecraft.PortNumber)
[Info] TCP/19132 (AMP:MinecraftBedrock01:MinecraftModule.Minecraft.PortNumber)
[Info] UDP/19132 (AMP:MinecraftBedrock01:MinecraftModule.Minecraft.PortNumber)

This issue is making no sense. I don’t even know if I suspect AMP is part of it anymore. Everything seems to be indicating things are working properly but some games just aren’t seen as open from WAN even with swapping to known working forwarded ports.

Is this something you’re home hosting? If so then you want to check first if they’re accessible via the LAN. If so, then the problem lies with the port forwarding.

Yeah it is a home server. Port forwarding is what is suspected and thoroughly tested before posting here. Port forwarding as far as I can tell is working as expected. Java MC works fine on any of these forwarded ports, but Bedrock MC does not. Creating a new instance of Bedrock gives the same results.

Do you have any other port forwarding rules? A lot of routers will misbehave if you have overlapping rules for example.

This is everything currently. I removed all the other games for testing this.

Bedrock is just UDP, Java is just TCP - try adjusting the protocol.

Same results. Can access Bedrock with LAN ip and Java LAN and WAN. When swapping ports they are running on within AMP these open/closed are swapped. If it was only Bedrock doing this I would suspect the game may have an issue but its multiple games. One I know right now is Valheim with this same issue for me.

image

image

You can’t use port checkers to check UDP ports. Your router might not also support hairpin NAT/NAT reflection.

Test by using a completely different network to try and connect, such as a tethered phone.

Ok so good news and bad news. Good news is connecting from my phone network worked. Bad news is this was a bit of a waste of your time now knowing the source of the confusion.

I didn’t know that about not being able to check UDP ports so thank you for that info. I was suspicious of NAT with this router firmware, but that’s an area I know basically nothing. So I will go study up on this more.

Thank you for all your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.