The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

Josh707
2015-05-05 15:29:32

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:

It's getting thrown when they try to connect via:

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
2015-05-07 15:00:45

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
2015-05-08 20:55:05

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
2015-05-12 15:58:51

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
2015-05-13 16:55:10

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
2015-05-20 09:29:28

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.

Back to top