Failed to get server instance

PAX
PAX
edited January 2014 in Photon Server
Hi,

I have same problem but with self hosted server.
createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {}.
UnityEngine.Debug:LogError(Object)
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:700)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:831)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:79)

How do i fix this?

Comments

  • The issue you have is something different. I renamed and split your post from the other thread.

    The output: "Failed to get server instance" points to the situation where a master server has no known game servers to send you to.
    This is a configuration issue where the game server is either not started or does not reach the master.
    Make sure the game server is started.
    If master and game server instance run on different machines, you need to adjust the game server config. Enter the master's IP and make sure it is available on that port (open firewall, etc).

    The games server configs are:
    \deploy\Loadbalancing\GameServer1\bin\Photon.LoadBalancing.dll.config
    \deploy\Loadbalancing\GameServer2\bin\Photon.LoadBalancing.dll.config

    If you can't find the issue, please zip your logs and attach them.
  • I have the same problem as him but I use Photon Cloud.I have no idea how to fix it. :cry: Please suggest me.
  • Which region and when did this happen (please include timezone info)?
    Does it happen again or is it working now?
  • I am getting this same error from Photon Cloud. Stack trace below.

    It has been happening consistently for the past 15 minutes. I am in the US region, timezone EST.

    createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {}.
    UnityEngine.Debug:LogError(Object)
    PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)
    NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:716)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:865)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:65)
  • jorkin wrote:
    I am getting this same error from Photon Cloud. Stack trace below.

    It has been happening consistently for the past 15 minutes. I am in the US region, timezone EST.

    createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {}.
    UnityEngine.Debug:LogError(Object)
    PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)
    NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:716)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:865)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:65)

    +1
  • I have been getting it too with the cloud.

    US Region Central timezone
  • As an FYI,

    if you're on a hard dependency of the Cloud, you can go into your PUN settings by selecting the Window menu from Unity and selecting Photon Unity Networking, and change your settings to EU or whatever one makes sense as a temporary work around.

    Just make sure you change it back once the US clous is back up.
  • Hi everybody,

    sorry for the delayed response. We had a capacity issue on Photon Cloud US yesterday, where new games could not be created for a time, while we were working to resolve this issue. We have upgraded our capacities by now and are currently working to prevent situations like these in future.

    Again, sorry for the inconvenience and the late response.
  • It's happening again (Jan 5th 2014)
    Using Photon Cloud and connected to master server on US server.
    The EU server works.

    I'm changing the code to try different regions if CreateRoom Fails. A better way to handle it?
  • Hey,

    sorry for this issue. We had a capacity issue on our Photon US Cloud last night. Currently, your approach to try different regions is the best way to handle this. We are currently working to implement client SDKs (+ server-side changes for Photon Cloud) that has built-in fail over mechanisms, so you won't need to worry about these kind of errors any longer. We'll release the new SDKs some time in the next weeks.
  • This is happening again in 2016 in the EU region and there is still no fail over mechanism! Also the OnPhotonJoinRoomFailed() method is not called at all, so we can't build a work around.

    Operation failed: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {} Server: MasterServer
    UnityEngine.Debug:LogError(Object)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1532)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[]) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:905)
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:503)
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1354)
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:156)

    How can I catch this error, so I can switch the region manually?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2017

    Photon EU cloud is back up and running. We're very sorry for the outage #status

    — Exit Games Photon (@ExitGames) January 7, 2017

    Hi @kampfhund,

    This is related to an issue with EU region which was fixed earlier today.
    Please follow @ExitGames on twitter to get status updates.
    Sorry for the inconvenience.
  • @JohnTube I don't know what you exactly have fixed, but the EU Cloud is down again and there is no update on twitter or elsewhere. Is the US cloud more stable? If so I will switch my game to use only the US cloud. This EU cloud problems are causing lots of bad reviews...
  • Hi @kampfhund,

    we are sorry for the inconvenience you had. We had some connection issues on saturday, which were solved as fast as possible.
  • Hi @Christian_Simon, is there a way to detect such problems in code, so I can switch automatically, for the time being, to another cloud (e.g. US)?
    Some error I can check for?
  • Hi @kampfhund,

    if you are using Best Region, the detected region is saved to the PlayerPrefs. When starting the game again and connecting to Photon this is checked. If the PlayerPrefs entry exists, it is used to connect to that region. If it doesn't exist, the process for finding the Best Region runs again.

    This means that you can force Best Region check on every game's start by adding PhotonHandler.BestRegionCodeInPreferences = CloudRegionCode.none; or PlayerPrefs.DeleteKey("PUNCloudBestRegion"); before you are connecting to Photon.

    If you don't use Best Region and force your players to a given region, you may want to implement OnFailedToConnectToPhoton(DisconnectCause cause) callback and try connecting to another (predefined) region. However, since Best Region is working on mostly all platforms, there is no reason to use a fixed region.
  • hi, this still randomly happening and the OnFailedToConnectToPhoton its not calling, any other way to handle this error?
  • Hi,
    I'm also facing this issue from Photon Cloud.

    Hosting:Photon Cloud
    region: IN(India)
    protocol:TCP

    Traces are as below

    Operation failed: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {} Server: MasterServer
    UnityEngine.Debug:LogError(Object)
    NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1442)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
    ExitGames.Client.Photon.TPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:149)
  • fyi - Has been fixed for India region.
  • para_nautilus
    edited March 2019
    Hi , I am facing this issue on local photon on-premises server, this error occurs intermittently which is really annoying while developing. please help.

    I don't think i have configuration issue because of these two reasons:
    1: as all the files are default config files and are not changed.
    2: It works some time, if it was config issue it should never work at all.

    Also note that this error does not occur on deployed server. Only occurs in development while running server with Visual Studio's F5 command (Debug).

    Also Note that once this error starts coming it wont stop until i restart the server.

    I Also tried debugging error on master server code, I saw that one of the UpdateAvailableGameServer method is removing only game server instance in the list which is causing this issue.

    Information that i would like to know:
    1: A sequence diagram how master , game server and client communicate or at least handshake.

    Any help is greatly appreciated thanks.

    Also Master And Game Server logs does not have any activity relating to these issues.

    :smile:

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @para_nautilus,

    2: It works some time, if it was config issue it should never work at all.
    Maybe the configured Game Server IP works in an environment (remote machine vs. running in VS locally) and does not work on another one. Maybe the configuration files are not the same in each case (remote machine vs. running in VS locally).

    Information that i would like to know:
    1: A sequence diagram how master , game server and client communicate or at least handshake.
    You can find details about the Master and Game Server here.
  • I've been getting an issue with the local server, i can run start and finish multiple games before this "failed to get server instance" occurs. The games start, players are spawned, game ends the list of players is cleared and they are dropped. The scene reloads where the host (reconnects to master and recreates the lobby)
  • To add: when this error occurs, its not just for my apps connection to the master server. When i run testclient in photon control (load balancing) the error occurs there too.
  • This can mean that your machine is overloaded. Usually, CPU is overloaded
    You may find this in Master.log file in deploy/log folder
    You will see that server loading was changed to Highest value. After then GameServer is not accessible anymore till the moment of loading reducing
    best,
    ilya