Problem hosting my own server

cj31387
cj31387
I have the photon control panel, I set the game server ip config to my real ip, port forwarded that default port 5055, set my settings to match that in unity. Started the application in control panel. Ran the test room thing, that worked. But when I try to join the game in unity I get this error, and then a disconnect. I just tried updating the PUN plugin into my project from unity asset store too, and I've tried x86 control panel, and x64 control panel, both do the same thing. I've had my game working in the cloud for a while but the ping has always been 100+ I really wanted to host my self so I can test the game at pings 30 or less.

[code2=csharp]Authentication failed: 'Unknown operation code 230' Code: -1
UnityEngine.Debug:LogError(Object)
PhotonHandler:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:170)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:802)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:862)
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:76)[/code2]

Comments

  • I'm sorry you ran into this. The problem is simple to fix:
    Make sure to start the "Loadbalancing (MyCloud)" labelled instance.

    These instructions hopefully help. Especially the "Photon Instances" part:
    http://doc.exitgames.com/photon-server/PhotonIn5Min/
  • hmm thanks that works for local mode. But setting my public IP everywhere it hangs on connecting to gameserver. I have all these ports forwarded in the photon unity config file. I also have it set to my public IP also and 5055. I opened up windows firewall and accepted the control panel as an exception too.

    "LoadBalancing"
    Loadbalanced setup for local development: A Master-server and two game-servers.
    Starts the apps: Game1, Game2, Master, CounterPublisher and Policy
    Listens: udp-port 5055, tcp-port: 4530, 843 and 943

    If I wait until after the connecting to gameserver hangs i get this message.

    [code2=csharp]Cannot send messages when not connected; Either connect to Photon OR use offline mode!
    UnityEngine.Debug:LogError(Object)
    PhotonNetwork:VerifyCanUseNetwork() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2011)
    PhotonNetwork:DestroyPlayerObjects(Int32) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1781)
    MPManager:OnDisconnectedFromPhoton() (at Assets/CJ Assets/Scripts/Multiplayer/MPManager.cs:42)
    UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
    NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1616)
    NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1226)
    ExitGames.Client.Photon.EnetPeer:Disconnect()
    ExitGames.Client.Photon.PhotonPeer:Disconnect()
    NetworkingPeer:Disconnect() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:206)
    NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1287)
    ExitGames.Client.Photon.EnetPeer:SendOutgoingCommands()
    ExitGames.Client.Photon.PhotonPeer:SendOutgoingCommands()
    PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:96)[/code2]

    are these ALL the ports required to be forwarded, or are there others for unity? Listens: udp-port 5055, tcp-port: 4530, 843 and 943
  • Ok got it working finally using this guide http://doc.exitgames.com/photon-server/ ... ng_started . Thanks and by the way

    Can someone link some unity networking or pun networking tutorials to better understand when to use certain things? Like when to know when to rpc all others buffered, or to know when to block off certain code in a script from being executed by others. Also how can you execute code to only apply to the networkView of the owner of the object, or how to find the owner of a object. Just some good tutorials on this stuff. Thanks
  • Actually trying to test with a friend in india, im in usa. With self hosting he cant join. I can join myself. All my settings are set to my public IP and port forwarded. But he cant join. He can connect to the game through the cloud mode though. But I really want to get self hosting working. I don't know why he cant connect. I actually changed from default unity networking to photon because this guy and a couple others couldn't join when I hosted a master server myself. But some people could join and some people couldn't when i was using default unity networking. The same thing is happening when I self host with photon.
  • About the tutorials: I don't know if there are a lot more but the Marco Polo Tutorial should be a good start:
    http://doc.exitgames.com/photon-cloud/M ... o_Tutorial

    You will see how to find the owner and such in this tutorial. When to disable scripts or keep them running everywhere is actually totally up to the usecase. That's a logical problem per game.

    The questions about server setup are better-off in the "Server" forum. Maybe you setup windows but not the router or other hardware to forward the needed ports. Or there is still a firewall blocking incoming connections. Nicole might help in the Server forum (once you checked both hints).