Master Game Server Has wrong port Info
by Paul Ash · in Torque Game Engine Advanced · 11/02/2010 (9:33 pm) · 12 replies
Hello,
I've been banging my head against this for awhile now. I have my game talking to the GG master game server and the first time I tried from an external network to query and connect, it worked fine, but ever sense then. The master game server cant seem to get the port right. I see it trying to ping my IP address but with a completely wrong IP Address (I use the default 28000 and it pings 1227 or 1236 or 1233 keeps changing). If I go to my host and change port with setNetPort to whatever the master game server thinks it should be, It works fine, but of course that cant work in any sort of real life case. I have even seen my IP address listed twice with different ports in the same query! (from the console of course because they never give a ping back).
Any help would be great.
I've been banging my head against this for awhile now. I have my game talking to the GG master game server and the first time I tried from an external network to query and connect, it worked fine, but ever sense then. The master game server cant seem to get the port right. I see it trying to ping my IP address but with a completely wrong IP Address (I use the default 28000 and it pings 1227 or 1236 or 1233 keeps changing). If I go to my host and change port with setNetPort to whatever the master game server thinks it should be, It works fine, but of course that cant work in any sort of real life case. I have even seen my IP address listed twice with different ports in the same query! (from the console of course because they never give a ping back).
Any help would be great.
About the author
#2
11/03/2010 (12:25 am)
I thought of a pretty nasty hack I could do to get around this. but its really not what I want to do. please anyone with a small bit of advice.
#3
Edit: also, when you fire up the dedicated server, then you go into the game are you querying LAN or Master server for the connection?
Are you also using two machines, one for dedicated server and one for the game connection?
11/03/2010 (9:33 am)
Do you have a static IP address for your internet connection and are you behind a hardware based firewall/router?Edit: also, when you fire up the dedicated server, then you go into the game are you querying LAN or Master server for the connection?
Are you also using two machines, one for dedicated server and one for the game connection?
#4
Edit: Oh and I am doing a master query
Edit: Query lan returns the correct port. only master game server has the wrong port info.
11/03/2010 (1:28 pm)
Yes I have a static IP address. I am behind a router, but the correct ports have been routed (except when it picks random ports to send to clients). I havent been using a dedicated server, its been host and client. I have been working with both on the same system and on two different systems, and even two different internet connections (different IP addresses). As far as I can tell the problem stims from information the host is sending to the mastergame server, its just wrong information. at one time I thought maybe my router was causing the problem but I even tried hooking up directly to see if that fixed the problem but I got the same result.Edit: Oh and I am doing a master query
Edit: Query lan returns the correct port. only master game server has the wrong port info.
#5
11/03/2010 (7:47 pm)
hmm, it's been a while since I did anything like this. My decicated server it setup to allow certain ports connecting to it via a firewall. It uses a static IP address, and I ensure that the prefs.cs file is setup to connect to the server correctly. If it works on LAN, and not via the Internet then it must be something to do with Network address translation where your ports are being changed. You could probably add a static route through your firewall/router for that specific port or IP/host name only for GG master server to see if that resolves the problem.
#6
11/03/2010 (10:22 pm)
Well. I messed with router settings. and the problem magically went away, which worries me. but its working now.....worried about it tho :)
#7
11/03/2010 (10:52 pm)
must have been network address translation (NAT), or where you didn't have a rule in your firewall to allow the port through.. you may have a very secure router :) Just make sure you've not opened lots of ports!
#8
11/04/2010 (2:23 am)
Well. it magically broke again. Didnt even touch my router. awesome. becoming frustrated.
#10
http://www.torquepowered.com/community/forums/viewthread/111921
Hope it helps.
T.
11/04/2010 (6:58 am)
HI bud. I found issues with 1.8.2 TGEA look over this thread.. it is old.. but.. the answer was there.http://www.torquepowered.com/community/forums/viewthread/111921
Hope it helps.
T.
#11
rolling back to 1.8.1 isnt something I want to do. if this is a known issue with torque itself. I'll do a simple hack.
for now I just told it to ignore whatever port the master game server says it should look for and just use what port I tell it too.
11/04/2010 (2:31 pm)
well its nice to know I'm not the only one with this headache.rolling back to 1.8.1 isnt something I want to do. if this is a known issue with torque itself. I'll do a simple hack.
for now I just told it to ignore whatever port the master game server says it should look for and just use what port I tell it too.
#12
// Enter all of the servers in this packet into the ping list:
for ( i = 0; i < serverCount; i++ )
{
stream->read( &netNum[0] );
stream->read( &netNum[1] );
stream->read( &netNum[2] );
stream->read( &netNum[3] );
stream->read( &port );
port = mStaticPort; // define mStaticPort as a console var or something.
dSprintf( addressBuffer, sizeof( addressBuffer ), "IP:%d.%d.%d.%d:%d", netNum[0], netNum[1], netNum[2], netNum[3], port );
Net::stringToAddress( addressBuffer, &addr );
pushPingRequest( &addr );
}
11/04/2010 (2:34 pm)
if anyone else runs into this problem. Here is the hack I did to last till they fix the problem. Its not to nasty, it just assumes the port the master game server gives is wrong and to use a set one.// Enter all of the servers in this packet into the ping list:
for ( i = 0; i < serverCount; i++ )
{
stream->read( &netNum[0] );
stream->read( &netNum[1] );
stream->read( &netNum[2] );
stream->read( &netNum[3] );
stream->read( &port );
port = mStaticPort; // define mStaticPort as a console var or something.
dSprintf( addressBuffer, sizeof( addressBuffer ), "IP:%d.%d.%d.%d:%d", netNum[0], netNum[1], netNum[2], netNum[3], port );
Net::stringToAddress( addressBuffer, &addr );
pushPingRequest( &addr );
}
Torque Owner Paul Ash