Unable to create room on client.

Hi, I've downaloded the photon server sdk, installed it and its up and running with LoadBalancing.

I created a sample client on Unity and seems I can connect and connect to master, even auto join lobby. But when I try to create room, this error log appears:


Failed parsing address:
UnityEngine.Debug:LogError(Object)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1574)
ExitGames.Client.Photon.IPhotonSocket:Connect()
ExitGames.Client.Photon.SocketUdp:Connect()
ExitGames.Client.Photon.EnetPeer:Connect(String, String, Object)
ExitGames.Client.Photon.PhotonPeer:Connect(String, String, Object)
NetworkingPeer:Connect(String, ServerConnection) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:590)
NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2175)
ExitGames.Client.Photon.<>c__DisplayClass146_0:b__0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:158)


And here is the c# code:


public override void OnConnectedToMaster() {
base.OnConnectedToMaster();
Debug.Log("Connected to Master");

RoomOptions room = new RoomOptions();
room.MaxPlayers = 1;
room.IsOpen = true;
room.IsVisible = true;

PhotonNetwork.JoinOrCreateRoom("Room123", room, TypedLobby.Default);
}


Checked the logs from the photon server and there isn't any log that correspond to that error.

Tried in Photon cloud and works flawlessly, this only happens when using the self hosted option. I'm using latest version of Photon server sdk and using Unity LTS 2017.4.1f1.

I would greatly appreaciate any help.

Best Answer

  • chris27chris27
    Accepted Answer
    Weird, just tried on my laptop and it worked out of the box :( disabled firewalls and anti virus and it didn't work on my first pc, but on my second no problem at all. Well I guess I will mark it as solved. Must have been a config I made on my first PC. Thank you!

Answers

  • Hi, @chris27

    Did you update LoadBalancing.dll.config for games server in order to set up its public IP?

    best
    Ilya
  • chris27chris27
    edited May 31
    Hi @chvetsov thank you for replying back :)

    However I tried that and it didn't work :(, same result failed parsing address, I assume that address is the IP address isnt?

    I found two files with the same name "Photon.LoadBalancing.dll.config" one in a GameServer/Bin folder and other in the Master/Bin folder. On both I left as blank the PublicIP as this
     
    
          
            
          
    
    There was another setting with the same name above on both files but I left it as it was, it was different than the MasterIP on the file within GameServer/Bin, like this;
    
    
            127.0.0.1
          
          
            60000
          
          
          
            4520
          
          
            192.168.1.68
    
    on the file that is on Master/Bin the value of MasterIPAddress is the same as the PublicIPAddress, not sure if that would help :(
  • chris27chris27
    Accepted Answer
    Weird, just tried on my laptop and it worked out of the box :( disabled firewalls and anti virus and it didn't work on my first pc, but on my second no problem at all. Well I guess I will mark it as solved. Must have been a config I made on my first PC. Thank you!
  • WxjWxj
    Hello. I meet the same problem, and do you know how to solve with it now?
  • hi, @Wxj.

    Please collect logs and provide them and also version of your client

    best,
    ilya
  • WxjWxj
    chvetsov said:

    hi, @Wxj.

    Please collect logs and provide them and also version of your client

    best,
    ilya

    Thanks a lot for your reply.
    I use Unity2018.4 as my Client, and PUN2-Free is download from Assets Store latest. And i can run the demo on the Cloud.
    The Server-SDK version : photon-server-sdk_v4-0-29-11263.

    My test code here:
        public void OnJoinedLobby()
        {
            Debug.Log("【OnJoinedLobby】");
    
    
            RoomOptions room = new RoomOptions();
            room.MaxPlayers = 1;
            room.IsOpen = true;
            room.IsVisible = true;
    
            //PhotonNetwork.JoinOrCreateRoom("Room123", room, TypedLobby.Default);
            PhotonNetwork.CreateRoom("room01", room);
        }
    My Log here:


    And PhotonServerSetting here:


  • WxjWxj
    I‘m sorry, and a little shame of that finally i find out the problem. I find that port "5056" is for the "Game" App in "PhotonServer.config", and "5055" is for the "Master" so i use 5055 as my config i get the right thing.
Sign In or Register to comment.