why did client leave lobby of self-hosting automatically

Options
xqterry
edited March 2014 in Photon Server
Hi
I just tried to move from photon-cloud to self-hosting because we have to create custom server to against cheating.
I installed photon server v3.4.1.2521 32bit, and started LoadBalancing (myCloud), (with correct firewall settings) on windows 7 PC in LAN, then I tried to run Vikings Demo on my mac.
If I set photon server setting with photon-cloud, everything works properly.
When I switched config to self-hosting photon server, I could enter lobby, but if I create room, the client side will leave lobby automatically.
On Unity console I got following log messages:
Successfully created replacement socket cause send failed once.
UnityEngine.Debug:LogWarning(Object)
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:172)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:796)
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:77)

And in photon-server MSMaster.log I got following
2014-03-04 15:00:45,846 [22] DEBUG Photon.LoadBalancing.MasterServer.PlayerCache [(null)] - Player state changed: pid=Guest5672, master=True, gid=
2014-03-04 15:00:45,908 [6] DEBUG Photon.LoadBalancing.MasterServer.MasterClientPeer [(null)] - OnOperationRequest: pid=5, op=229
2014-03-04 15:00:45,908 [6] DEBUG Photon.LoadBalancing.MasterServer.MasterClientPeer [(null)] - Joined lobby: , 0
2014-03-04 15:00:47,453 [6] DEBUG Photon.LoadBalancing.MasterServer.MasterClientPeer [(null)] - OnOperationRequest: pid=5, op=227
2014-03-04 15:00:47,453 [6] DEBUG Photon.LoadBalancing.MasterServer.GameApplication [(null)] - Created game: gameId=myRoom, appId={Default}
2014-03-04 15:00:47,468 [6] DEBUG Photon.LoadBalancing.MasterServer.Lobby.GameState [(null)] - Added peer: gameId=myRoom, userId=Guest5672, joiningPeers=1
2014-03-04 15:00:47,468 [36] DEBUG Photon.LoadBalancing.MasterServer.PlayerCache [(null)] - Player state changed: pid=Guest5672, master=True, gid=myRoom
2014-03-04 15:00:47,499 [6] DEBUG Photon.LoadBalancing.MasterServer.MasterClientPeer [(null)] - Disconnect: pid=5: reason=ClientDisconnect, detail=
2014-03-04 15:00:47,499 [6] DEBUG Photon.LoadBalancing.MasterServer.GameApplication [(null)] - OnClientDisconnect: peerId=5, appId={Default}
2014-03-04 15:00:54,972 [35] DEBUG Photon.LoadBalancing.MasterServer.Lobby.GameList [(null)] - Checked join timeouts: before=1, after=1
2014-03-04 15:01:02,475 [35] DEBUG Photon.LoadBalancing.MasterServer.GameApplication [(null)] - Removed game: gameId=myRoom, appId={Default}
2014-03-04 15:01:02,475 [35] DEBUG Photon.LoadBalancing.MasterServer.Lobby.GameList [(null)] - RemoveGameState:id=myRoom, peers=0, max=10, open=True, visible=True, peersJoining=0
2014-03-04 15:01:02,475 [35] DEBUG Photon.LoadBalancing.MasterServer.Lobby.GameList [(null)] - Checked join timeouts: before=1, after=0

it said "Disconnect: pid=5: reason=ClientDisconnect", I don't know if I did something wrong of server configuration, please help.

Thanks.

Comments

  • Found the reason, sorry for bothering.

    The reason is server IP config was set to 127.0.0.1, when client creates room it could not found game server.
    Setting server IP to LAN or public resolves issue.