Cant connect to self hosted photon server

Options
Keyvan
Keyvan
edited March 2023 in Photon Server

Hello,

I installed photon server on custom windows server, and I have client Pun client SDK in unity game,

Server version: SDK 4.0.28.2962

Pun client version: 2.40 Photon lib 4.1.6.11

But I can't connect to server and get this error:

Failed to connect to server after testing each known IP.


Steps I done:

Starting Photon in 5 Minutes | Photon Engine


The game connects successfully to photon servers but when I set the IP address of my server in server settings in Unity, game can't connect.

is there any version compatibility problem or any missing step that I need to do to connect?

Answers

  • chvetsov
    Options

    hi, @Keyvan

    did you update GameServer.dll.config and PublicIpAddress for game server to your IP?


    best,

    ilya

  • Keyvan
    Options

    hi @chvetsov , Thank you for your respond.

    where is the GameServer.dll.config file? (I searched in unity project and server sdk and did not find file with this name)

    I wrote the server IP in server field in PhotonServerSettings.asset file in unity package.

    and in server I run the load balancing and activate the set public ip address to .....

  • chvetsov
    Options

    hi, @Keyvan

    ah, I'm sorry. wrong file name. It is called Photon.LoadBalancing.dll.config

    it is in deploy/LoadBalancing/GameServer/bin/Photon.LoadBalancing.dll.config


    best,

    ilya

  • Keyvan
    Options

    hi @chvetsov

    Yes, I changed public IP parameter in Photon.LoadBalancing.dll.config, is there any other change need to do except the public IP?

  • chvetsov
    Options

    hi, @Keyvan if you master is hosted on another machine than also you have to fix master server address.

    in order to help more I need to know more -

    on what stage client fails to connect?

    logs from client, logs from server


    best,

    ilya