Author Topic: Server hangs for ages on disconnect  (Read 4844 times)

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Server hangs for ages on disconnect
« on: May 23, 2013, 05:56:08 AM »
Hello Michael,

I have been experiencing a strange problem which is happening on both my apps and your demo main menu app.

Version 1.6.9

I start the app. (the demo main menu)
Create a new local server
Stop the local server
App hangs for about 3 minutes and then disconnects

It does the same in both the editor and the compiled app.

I have tried this on Windows XP and Windows 7 on my network with the same results.  Why would it be taking so long to disconnect the server?

Many thanks,

Justin
« Last Edit: May 23, 2013, 06:42:30 AM by SketchWork »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #1 on: May 23, 2013, 11:03:40 AM »
3 minutes? o_O

When you execute the TNServer.exe, do you see it find the gateway IP?

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #2 on: May 23, 2013, 02:39:19 PM »
Hmmm,

WIN7 machine says gateway not found, but everything else is fine.
WINXP can find the gateway, but comes up with these messages too:

UDP Lobby Server started on port 51
Game server started on port 5127
Press 'q' followed by ENTER when yo
UPnP: Unable to open UDP port 5129
UPnP: Unable to open UDP port 5128
UPnP: Unable to open TCP port 5127

Everything runs perfectly though using both TCP and UDP.

Confused :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #3 on: May 23, 2013, 08:41:39 PM »
WinXP likely gets confused. Win7 would find the gateway if it existed. Either the router you have doesn't support UPnP, or you don't have a router to begin with. Since you have two machines, my guess is on the former.

Don't worry about it not being able to find the gateway. It's an optional component that simply unlocks ports automatically letting people from the internet connect to you. The alternative is to open ports manually.

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #4 on: May 24, 2013, 06:47:46 AM »
The router definitely has uPnP set up.

After rebooting the hub the output on my WINXP machine looks good with this output:

  1. IP Addresses
  2. ------------
  3. External: XXX.XXX.XXX.XXX
  4. Internal: 192.168.1.70
  5. Gateway:  192.168.1.254
  6.  
  7. UDP Lobby Server started on port 5129
  8. Game server started on port 5127
  9. Press 'q' followed by ENTER when you want to quit.
  10. UPnP: UDP port 5129 was opened successfully.
  11. UPnP: TCP port 5127 was opened successfully.
  12. UPnP: UDP port 5128 was opened successfully.

and the output on the WIN7 machine doesn't look too good with the following output:

  1. IP Addresses
  2. ------------
  3. External: XXX.XXX.XXX.XXX
  4. Internal: 192.168.1.86 <---- updated
  5. Gateway:  None found
  6.  
  7. UDP Lobby Server started on port 5129
  8. Game server started on port 5127
  9. Press 'q' followed by ENTER when you want to quit.

So the WINXP machine looks fine, but the WIN7 machine on the same network with no other server running can't find the gateway and also doesn't have the UPnP messages once it connects:

  1. UPnP: UDP port 5129 was opened successfully.
  2. UPnP: TCP port 5127 was opened successfully.
  3. UPnP: UDP port 5128 was opened successfully.

Why doesn't this machine find the Gateway and why does it not have the port successfully opened messages?  Bother are running the exact same server exe compiled with the same TNet source as the app.

Many thanks for your patience :)

Justin
« Last Edit: May 24, 2013, 04:07:01 PM by SketchWork »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #5 on: May 24, 2013, 03:57:17 PM »
Two things wrong I see with that output. First -- the address of both of your machines matches. This is invalid to begin with -- how did this happen? (192.168.1.70)

Second -- the gateway address is very strange. 254? The gateway is generally 192.168.1.1. What is on 254?

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Server hangs for ages on disconnect
« Reply #6 on: May 24, 2013, 04:04:55 PM »
Sorry that was a cut and paste error (I have updated the original post, sorry about that.  The IP's are actually different.  My router gateway is definitely 192.168.1.254 as I use this address to configure it.