Client is connected but can't join or create matches

marf
marf
Hi, I'm using the Photon Server in my local machine and I'have got some problems, if I run the game in my local computer all works fine but if one of my friends try to run it the client sees all the current matches and it's connected but when it tries to join or create a room in output_log.txt this error happens:

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 

 

(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)



OnFailedToConnectToPhoton

 

(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)



OnDisconnectedFromPhoton

 

(Filename: C:/BuildAgent/work/b0bcff80449a48aa/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)


I opened port 5055, in fact the client is connected.

Where's the error?


Thanks,

marf

Comments

  • Anyone can help me?
  • It doesn't seem like the client ever connected. "OnFailedToConnectToPhoton" is called because it can't connect and that's what I see in your log.

    Make sure your server can be reached by the clients you want to connect to it. This includes all sorts of firewall rules and routing hardware setup.
    Sorry, I can't really help in more detail.
  • But this is very strange because I can see the matches of the other players, why?
  • Hm. Then it's the gameserver you can't connect to. Once you pick a game, we disconnect from the master and re-connect to the game server that the room is on.
    Most likely, the gameserver config is set to "127.0.0.1" as public IP. Then remote clients can't connect to that.

    Photon.LoadBalancing.dll.config is the file you want to edit. This is described here:
    viewtopic.php?f=17&t=1059&p=5006&hilit=Photon.LoadBalancing.dll.config#p5006

    Make sure to restart your server after editing.
  • Ok, I will try.