Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Photon Server join/create game problem

$
0
0
Hi,

It seems there is a problem joining and creating rooms on a remotely running Photon 3 server. I'm using PUN 1.4 to create the connection. When calling PhotonNetwork.Connect() everything seems to be just fine. I connect to my remote server, but if I try to call PhotonNetwork.CreateGame() or PhotonNetwork.JoinGame(), I'm thrown the following exception:
Error trying to receive. Exception: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.

  at System.Net.Sockets.Socket.Receive (System.Byte[] buffer) [0x00000] in <filename unknown>:0 
  at ExitGames.Client.Photon.NConnect.Run () [0x00000] in <filename unknown>:0 
UnityEngine.Debug:LogError(Object)
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:121)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:816)
ExitGames.Client.Photon.<>c__DisplayClass2:<EnqueueDebugReturn>b__0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:75)

This is followed by
OnFailedToConnectToPhoton, StatusCode: Exception

If I run the Unity client on the same computer as my Photon server, there doesn't seem to be any problems at all in creating and joining games. I can even start up another client remotely, connect, and see the active games that are shown in the lobby. But when I try to join, I'm thrown off and given the exception.

If I have a a Photon server running both remotely and locally, and connect to the remote server, the case is the same as above. But when I try to join or create a game, my client instead connects to the local server and tries to join/create the game there. The odd thing is, that in this case, I don't receive any OnConnectedToPhoton() from the local server or OnDisconnectedFromPhoton() from the remote server. The only way I know that I've connected to and created a game on my local server instead, is that PhotonNetwork.networkingPeer.ServerAddress is set to 127.0.0.1:5056, and that I would have gotten the exception and failed to connect, if the local server hadn't been running.

I'm currently running RC6. The same problem was detected on RC5 and RC5a. Earlier versions haven't been tested.

I'm assuming the problem is some hardcoded test stuff in the Photon3Unity3D library, but I hope you can diagnose the problem soon, as it's a pretty serious problem for us atm that all clients have to be running on the same computer as the Photon server.

Viewing all articles
Browse latest Browse all 8947

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>