[SOLVED] User unable to connect to cloud (Connect() failed)

Options
Hey there, one user is unable to connect to the cloud, they're getting a SocketException when the application tries to connect. This is the first I've heard of it happening since release which was about 10 months ago and there are quite a few players, so it's really rare. This makes me think it's a router/firewall problem on their end, not an error in the game code as every other player connects fine.

This is what gets written in the log:
Connect() failed: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 

  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 

  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0 

  at ExitGames.Client.Photon.SocketUdp.DnsAndConnect () [0x00000] in <filename unknown>:0 


OnFailedToConnectToPhoton : ExceptionOnConnect

It's getting thrown when they try to connect via:
PhotonNetwork.ConnectToMaster("app-us.exitgamescloud.com", 5055, appid, version);

Now I don't know what to tell them so I came here for advice. What kind of things should I get that user to try to fix this problem? So far I've simply told them to allow ports 4530 (TCP) and 5055 (UDP) which I got by quickly skimming through this page. Port 5055 is the one passed to ConnectToMaster() as well. Did I maybe miss any ports they should try to allow? Not sure what else to try.

Comments

  • Tobias
    Options
    I only know this type of error when the client connects to a local host and Photon does not run. Then Windows throws this error, as it locally can tell that no service is listening and the request is rejected. Remotely, the error is unusual. If a remote server is unavailable this results in a timeout.

    I could use the whole log (please post to hastebin.com or so). Is this happening every time?
    I would like to know which address fails (I know what you set in ConnectToMaster() but that maybe isn't used in the end or maybe we fail to connect to the game server).
    The user could check the hosts file, too. Maybe some address points to the local machine?
    A re-install in another location should popup Windows' dialog to allow access. Maybe that helps.
    All ports required are listed here:
    http://doc.exitgames.com/en/onpremise/c ... quirements
  • Josh707
    Options
    Here's the whole log that they sent to me: http://pastebin.com/yXvBnf3W

    Yes it seems to be happening every time, they say they can't connect to multiplayer at all. I'm not sure how to get the address you mentioned, I followed all of the method calls in the chain from ConnectToMaster() until it got to a virtual method handled in what I assume is the external DLL, but it just gets passed the master server address and port I supply with a colon between them.

    The user said their firewall is disabled entirely so I don't know if that allowing network access dialog is the problem. I'll ask them about their hosts file and check that out, but they said they'll probably end up reinstalling Windows itself and see if that makes any difference.
  • Tobias
    Options
    There are a lot of scripts missing. Maybe one sets a proper address?
    The address that's passed into the Connect method is of interest. It seems the client never connects at all, so even the name server or master server address might be wrong.
    Which server should the client reach??

    There's no clue what goes wrong really. A reject is usually impossible in UDP, as the communication level is session-less and we do all the acknowledgement.
  • Josh707
    Options
    I know the missing scripts are a problem but they're unrelated to Photon.

    So apparently the user can connect with Firewall disabled after they re-installed Windows. I can't tell if they tried disabling it or not before the OS re-install due to their wording so that might have been the issue all along, but I told them to try it before, along with manually allowing the game's .exe through it. Either way they're able to connect and play properly now, with it disabled. I think they've allowed all of the ports in their router's settings so that may have been part of it too.

    Anyways, thanks for the help!
  • Tobias
    Options
    Thanks for the update. I am happy that the user can now play but I am amazed this has been such an issue in the first place. Usually, the Windows Firewall is the only piece that's so restrictive. It asks the user to unblock an exe once and if you deny network access there, things won't work. The router and all other elements should be fine because the client is reaching out to the server and gets responses. Those are usually fine.