Photon server and PUN 2 samples
Options
tell a newbie please.
Installed the last server. I installed the last PUN2 in the new unit project. Set the correct connection address in the settings 127.0.0.1:5056. But when I try to connect, I get an error
Got a unexpected Disconnect in LoadBalancingClient State: Disconnected. Server: MasterServer Trace: at Photon.Realtime.LoadBalancingClient.OnStatusChanged(StatusCode statusCode) in C:\!Unity\TestPhoton\Assets\Photon\PhotonRealtime\Code\LoadBalancingClient.cs:line 2302
at ExitGames.Client.Photon.PeerBase+<>c__DisplayClass100_0.b__0() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PeerBase.cs:line 895
at ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\EnetPeer.cs:line 429
at ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PhotonPeer.cs:line 1422
at Photon.Pun.PhotonHandler.FixedUpdate() in C:\!Unity\TestPhoton\Assets\Photon\PhotonUnityNetworking\Code\PhotonHandler.cs:line 126
UnityEngine.Debug:LogWarning(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1814)
Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2304)
ExitGames.Client.Photon.<>c__DisplayClass100_0:b__0() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:895)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:429)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1422)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:126)
Installed the last server. I installed the last PUN2 in the new unit project. Set the correct connection address in the settings 127.0.0.1:5056. But when I try to connect, I get an error
Got a unexpected Disconnect in LoadBalancingClient State: Disconnected. Server: MasterServer Trace: at Photon.Realtime.LoadBalancingClient.OnStatusChanged(StatusCode statusCode) in C:\!Unity\TestPhoton\Assets\Photon\PhotonRealtime\Code\LoadBalancingClient.cs:line 2302
at ExitGames.Client.Photon.PeerBase+<>c__DisplayClass100_0.b__0() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PeerBase.cs:line 895
at ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\EnetPeer.cs:line 429
at ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PhotonPeer.cs:line 1422
at Photon.Pun.PhotonHandler.FixedUpdate() in C:\!Unity\TestPhoton\Assets\Photon\PhotonUnityNetworking\Code\PhotonHandler.cs:line 126
UnityEngine.Debug:LogWarning(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1814)
Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2304)
ExitGames.Client.Photon.<>c__DisplayClass100_0:b__0() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:895)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:429)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1422)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:126)
0
Comments
-
@chvetsov , thanks for the answer.
All services of the server are started, I attach logs.
Judging by the error, it occurs somewhere in the server.
In server log: 13360: 10:51:35.378 - CENetThreadPool::Process - Exception - CENetPeerBase::HandleIncomingCommands() - PeerAppSelection()- Init: Unexpected protocol, expected value is between 1.2 and 1.7 : id = 0 [0] Datagram: 00 00 00 02 00 00 02 05 13 FA 18 BB 01 FF 00 00 00 00 00 14 00 00 00 00 00 00 00 00 05 16 68 EE 06 00 01 04 00 00 00 35 00 00 00 01 F3 00 01 08 1E 41 02 01 00 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ..............................h........5.........A...1............................... from: 127.0.0.1:49288 on: 127.0.0.1:5055
1 -
yeah, now I see what is wrong, PUN2 uses unsupported by this version of self-hosted SDK protocol 1.8
so, either use cloud or try to change the protocol to 1.6.
how to do so please ask in the corresponding forum section
best,
ilya0 -
Very sorry. Are there any plans to update the SDK on the self-hosted?1
-
yes, we are preparing the new release
best,
ilya1 -
Any timeline for the new server version? Having upgraded to PUN 2 this is currently stalling my project.1
-
@chvetsov I'm getting the same error as above: CENetThreadPool::Process - Exception - CENetPeerBase::HandleIncomingCommands() - PeerAppSelection()- Init: Unexpected protocol, expected value is between 1.2 and 1.7
Perhaps I'm misunderstanding what my options are. How can I configure PUN 2 to use an older protocol? Online is unfortunately not practical for development due to our location (South Africa) and the project's sensitivity to latency.0 -
it will be probably better if you will ask in PUN's forum section
best,
ilya0 -
Great, thank you!0
-
I still get the error 'Unexpected protocol, expected value is between 1.2 and 1.7' in the log and DisconnectedByServerReasonUnknown on the client0
-
The changelog in the folder PhotonUnityNetworking says "v2.5 (20th November 2018)"0
-
hmm weird.
Could you try in a fresh clean new project?
How do you connect to your self-hosted Photon Server? could you try doing that using PhotonNetwork.ConnectUsingSettings after setting server address and port in PhotonServerSettings and unchecking UseNameServer?1 -
Hey JohnTube - that did acutally work!
So for everyone who will follow. This does not work:PhotonNetwork.ConnectToMaster("127.0.0.1", 5055, PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime);
Try this:PhotonNetwork.PhotonServerSettings.AppSettings.UseNameServer = false;
PhotonNetwork.PhotonServerSettings.AppSettings.Server = "127.0.0.1";
PhotonNetwork.PhotonServerSettings.AppSettings.Port = 5055;
PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = null;
PhotonNetwork.ConnectUsingSettings();0