System Information
Field |
Value |
Operating System |
Linux - Ubuntu 24.04.2 on x86_64 |
Product |
AMP ‘Phobos’ v2.6.2.0 (Mainline) |
Virtualization |
None |
Application |
Terraria |
Module |
GenericModule |
Running in Container |
No |
Current State |
Ready |
Problem Description
Issue
After starting my Terraria server, port 7777 stops listening. This makes it so that no new players can join the server. The only remedy I have found is to restart the server. I have tried adding port forwarding rules and reservations in my router but there is no effect.
Reproduction Steps
- Start server
- Ports 2225 TCP and 7777 TCP are open/“listening”
- Randomly around an hour-ish, port 7777 will stop listening
I have been having the same issue, running Ubuntu Server 24.04.2. This only happens with the Terraria server, as I have a 24/7 Minecraft server running in parallel (both are on default ports, so conflicting ports are not the issue).
I have troubleshooted this, and can tell it’s not a process killer issue as I am not reaching even half of my available RAM, or an FD limit issue, as I have raised those for the amp user.
Originally, the server was running inside a container, but the host-mode networking option is selected, so that should not be an issue. Regardless of that, I attempted to try and run the server outside of Docker, and the issue persisted.
The only known fix is to restart the server for the port to reopen, which is rather inconvenient.
I can also see this issue has been happening at least since March, as I can see threads pointing to the same thing, and none of them seem to have received any replies.
Yeah, I’ve observed the same as well. My current “solution” was to add a few triggers. Every 2 hours, the server restarts while also making a backup, and another trigger that pushes a warning message into the console so people know its going to restart soon.
I have also since started a tmodloader server that opened port 7779 (since the vanilla server still reserved 7777) and the issue still followed.
Thank you for your findings though!
I am not 100% sure this is the case, however, I have now started a modded server of Terraria, and I have not run into this issue yet.
Granted, I have set up the trigger to restart the server every hour if no one is online to ensure people can join, but having run the server for multiple hours without a restart both yesterday and today, I have not encountered any issues with not being able to join.
This seems to suggest the problem is specifically with base Terraria, so as a possible workaround, unless it’s specifically the latest version of Terraria you are interested in hosting, you could try hosting a tmodloader server without any mods?