Not listed on master server
Hello guys,
I am moving to a new server and have copied my Tribes 2 server to the new one. But now I have problems to be listed on the master server and I don't know why, because on my old server everything is running and it is also listed. I can also connect to my new server through the console with JoinGame("IP:28000"); , this is not a problem, so port forwarding is okay, but I am still not listed there.
First I couldn't also join the game over the console, I got a "Man in the middle message", very strange, because it is a dedicated server with fixed public IP. I used then the BindAddress inside the ServerPrefs.cs and put it to the public IP, and now I am able to connect over the console.
I hope someone here has an idea why I am still not listed.
Thanks a lot.
Comments
I am not very knowledgeable about this, so, until someone with more expertise on this issue can jump in to help you...
... maybe a firewall is blocking the Tribes 2 .exe? Also, I would double check that the port is forwarded properly. If everything works correctly, you should see in the server console, after everything was loaded, that a heartbeat was sent to TN.
Here's what Thyth had to say in a thread about running two servers from the same IP/computer
You need to forward only one port on your NAT device. This is the port that the game server is listening on in UDP mode. By default this port is 28000, but it can be changed in the server configuration (e.g. to run more than one server from the same computer/IP).
Here's a relevant thread about the Man in the middle message:
https://www.tribesnext.com/forum/discussion/4097/server-problem-man-in-the-middle
I have now more information, I checked the IP address over the console on both of my servers with echo($IPv4::InetAddress);
The old server gaves me my public IP address, but the new server only a simple 1979 as IP address. This is then of course the reason why it is not listed. But now the question is, from where does Tribes 2 get this address? As I mentioned used the BindAddress feature inside the ServerPrefs.cs with my public IP and having these problems
I assume you already did what I am about to say (regarding the BindAddress config), but if it's a mod, make sure you're altering the ServerPrefs.cs from the mod folder you're trying to run. GameData\base\prefs\ServerPrefs.cs for normal Tribes 2 and GameData\Mod name here\prefs\ServerPrefs.cs if it's a mod. Different ServerPrefs.cs for different mods.
Another thing you can do is try to not use ispawn.exe. You can also try putting the following line in a .cs file in the scripts/autoexec folder: $IPv4::InetAddress = $Host::BindAddress;
If nothing works, you'll probably have to send a private message to Krash, if he doesn't respond here. He's very knowledgeable about these things. Also, check the following 2 threads for more relevant information. Sorry, I wish I could help you out more but this is where my knowledge ends :(
https://www.tribesnext.com/forum/discussion/253/cannot-bind-to-ip-address-using-ispawn-exe
https://www.tribesnext.com/forum/discussion/4332/master-server-heartbeat
Yes, I already checked everything again, the firewall can not be an issue, since I can connect manually over JoinGame, so the port is open.
ServerPrefs.cs is also the correct one where I did the edit.
And I don't use ispawn, since it is a Debian 11 server, I just run it over xvfb and wine with the Tribes2.exe -dedicated as it is written inside the tutorial.
Also on the other server Debian 11 is installed with same settings and everything is working fine.
I also tried the $IPv4::InetAddress = $Host::BindAddress; inside a .cs file, now the IP address is correct when I check it over the console with echo($IPv4::InetAddress); and I had some hope that the server will be listed now, but nothing. When I start the heartbeat with StartHeartbeat(); it is telling me, that the server was added to the list, but I guess the master server is still getting some faulty IP address like this "1979" at the beginning.
So thank you very much for your help Roboto, I hope Krash will have some ideas what could be wrong here.
On start-up, the server will make an outbound http request to our web services in attempt to detect a public address for $IPv4::InetAddress, and in the vast majority of home network setups this will provide the correct configuration automatically. This has its limitations however, as with multiple interfaces or setups tunnelling or otherwise treating that traffic differently, the remote address the service sees connecting to it over TCP may not necessarily be the same as what the game server is listening on.
This same method of public address detection (which you can try in a browser or curl -4 request with http://master.tribesnext.com/whatismyip -- noting a browser may show an ipv6 address which will not be the case for game queries) is used by default in detecting which game server to query when a heartbeat request is sent to the master server.
Having the ipv4 address variable set correctly is certainly ideal for the sanity check, but not required if you have $Host::BindAddress bound on a dedicated server. When this is set, both the sanity check and heartbeat requests to the master server will use this host preference variable as the public address. The master server specifically is written so that upon receipt of a web request by the game to
http://master.tribesnext.com/add/$Host::Port/$Host::BindAddress
it will make the same UDP query to that address that a player attempting to see information on your server on the list will make, at which point your server will have 1.5 seconds to respond, and if it does it'll be added to the list after the next cache period.You haven't mentioned any error responses to your heartbeat requests: are the heartbeats running on schedule and echoing to the console? You're not running in LAN mode?
Thanks for the detailed answer. I am not running in LAN mode, it is a copy of my old server which is running fine online and also shown on the server list.
So I just did a check with Curl and also with Lynx and I always get a 403 Forbidden and this Message from Cloudflare as answer.
Icon for master.tribesnext.com master.tribesnext.com
Checking if the site connection is secure
Enable JavaScript and cookies to continue
master.tribesnext.com needs to review the security of your connection before proceeding.
Ray ID: 7aa0c3138e82d59c
Performance & security by Cloudflare
So in this case Tribes 2 has no chance to get the IP address from the server. From my Home IP address this won't happen and also on my old server the Curl output is the public IP address.
I am using now a workaround and sending a Curl request to the master server from another server, like you have to do when you are setting up a full linux server without wine and which doesn't have the Cloudflare problem and this is working fine. Now the new server is also listed, great 🤩
Having a workaround is nice but is there anything possible to solve this issue with Cloudflare?
Thanks for your help.
Your IP fell under the challenge list because quite a few nearby hosts were being used for malicious/spam purposes against the site. It should be allowed through now, but if the address changes and the spam bot people become active again it may need verified again.
Technically you can also bypass this by making the heartbeat request directly to one of the masters and letting it replicate, as it's just the top level behind this layer, but people have abused this in the past by hitting it far too often, so it's not the preferred approach.
Thank you very much for your help. Now I get the Heartbeat confirmed message directly on the server 😎 👍️