Stuck at ConnectingToGameserver

Options
Hello.
We have set up PhotonServer on a local machine, opened all specified ports and shut off any and all firewalls and virus protection. When we attempt to connect to this server within the LAN, it connects fine. No issues.

However, when connecting over the internet using a public IP address, we get stuck with PhotonNetwork.connectionStateDetailed reporting ConnectingToGameserver.

We have verified that we have OnJoinedLobby fires, which is where we attempt to join or create a room. However, this does not happen and an error is thrown:

Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or ConnectedToMasterServer.

As I mentioned, OnJoinedLobby DOES fire, and it is in that callback that we attempt to create or join a room, but doing so is what throws the error.

As note: ConnectedToMasterServer never fires.

We have poured over our port setting double, triple and quadruple checking them for accuracy. The server runs fine if the game connects locally. What are we missing?

Comments

  • edgrimaldi
    Options
    We resolved the issue but are not totally certain as to how. Our best guess is that the Server address in the PhotonServerSettings of the game did not match the public IP address. However, it still doesn't explain why the OnJoinedLobby call back would be returned, which prevented us from even looking at the ServerIP address. It seemed to be a safe assumption that it was correct. Very frustrating. And again, our best guess there is, the OnJoinedLobby callback was firing because we had Auto-Join Lobby checked and doing so fires the callback, even though it has not actually joined a lobby.
  • chvetsov
    Options
    hi, edgrimaldi

    i think that main problem in settings of Game server. During registration GS reports his address to master. and when you create/join game Master sends this address to you. if it is local then you are not able to connect to it.

    So, you able to connect to Master, because public ip is listened by photon. you managed to join lobby and create game on master, but you are not able to join GS because you get wrong address from Master.

    you need update LoadBalancing.dll.config and set correct address and port for you GS

    best,
    ilya
  • chvetsov
    Options
    also, we strongly do not recommend to auto join lobby. because lobby will send back to you list of all games and game changes. this will kill your clients if you have many games

    best,
    ilya