Author Topic: UPnP: A connection attempt failed because...  (Read 2764 times)

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
UPnP: A connection attempt failed because...
« on: June 25, 2016, 12:04:54 PM »
Duplicating the code form the example, I get this iwhen I start a server:

UPnP: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Just calling:
  1. public int serverTcpPort = 5127;
  2.  
  3. if(TNServerInstance.Start(serverTcpPort, Random.Range (10000, 40000), lobby.remotePort, "server.dat", TNServerInstance.Type.Udp)){
  4.         twn_netName.PlayForward ();
  5. }
  6.  
'lobby' is a public field set in the Inspector with a UDP Lobby Client.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UPnP: A connection attempt failed because...
« Reply #1 on: June 25, 2016, 12:07:04 PM »
UPnP is when it tries to open a port on the router. It may or may not work depending on the router's capabilities.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: UPnP: A connection attempt failed because...
« Reply #2 on: June 26, 2016, 11:56:14 AM »
What's the correct response? UDP certainly works over the router. This is converting a TNet2 game to Tnet3, and there was no such error message and it worked fine.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UPnP: A connection attempt failed because...
« Reply #3 on: June 27, 2016, 06:49:32 AM »
The expected response is "Opening TCP port 5127 on 192.168.X.X" if it's successful. You can see a similar message by launching WWServer.exe. The ports are opened for the server instance and are not related to the lobby server/client.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: UPnP: A connection attempt failed because...
« Reply #4 on: June 27, 2016, 07:27:59 AM »
Sorry, I meant what should my correct response be to this error? Is it something I need ot worry about or can I ignore it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UPnP: A connection attempt failed because...
« Reply #5 on: June 27, 2016, 06:07:04 PM »
I don't know your router set up so I don't know what the expected response would be. I say don't worry about it.