[Solved] Connecting to non-local Photon Server
Options
I've been successfully running an RC7 Photon Server, which I can connect to remotely. This was made possible by changing the public IP Address property in the following files:
deploy\Loadbalancing\GameServer1\bin\Photon.LoadBalancing.dll.config
deploy\Loadbalancing\GameServer2\bin\Photon.LoadBalancing.dll.config
deploy\Loadbalancing\Master\bin\Photon.LoadBalancing.dll.config
For the RC8 server, I can't get it to connect remotely. It works fine if the server runs locally.
I've done the same modifications to a Photon Server RC8, except that the config file in the Master folder no longer contains any <applicationSettings> tag, under which to set the public IP address.
I've tried adding an <applicationSettings> section, with the result that the server didn't start at all.
So, my question is, what's changed that I need to know about, to be able to connect remotely?
deploy\Loadbalancing\GameServer1\bin\Photon.LoadBalancing.dll.config
deploy\Loadbalancing\GameServer2\bin\Photon.LoadBalancing.dll.config
deploy\Loadbalancing\Master\bin\Photon.LoadBalancing.dll.config
For the RC8 server, I can't get it to connect remotely. It works fine if the server runs locally.
I've done the same modifications to a Photon Server RC8, except that the config file in the Master folder no longer contains any <applicationSettings> tag, under which to set the public IP address.
I've tried adding an <applicationSettings> section, with the result that the server didn't start at all.
So, my question is, what's changed that I need to know about, to be able to connect remotely?
0
Comments
-
For the master it was never required to set the public IP as it is the 'main application' in the PhotonServer.exe.config within the bin/Win64 or Bin/Win32 folder where you would control that0
-
Thats right only the GameServer require a publicIp setting. They register when they connect to the Master and the master sends it to the clients when they request a game.
So it should work ... have you checked your firewall, does it allow to connect? It could be blocking the new PhotonSocketServer.exe.
You should be able to telnet port 4531 from a remote pc.
Note: in our default PhotonServer.config we set the listeners to 0.0.0.0 which tries to bind all available ip's. So no change should be necessary there either.0 -
I've tried disabling the firewall. It had no effect.
In Unity I get 3 messages when connecting remotely:
1. OnConnectedToPhoton
2. OnFailedToConnectToPhoton
3. OnDisconnectedFromPhoton
When connecting locally, there are no issues connecting or creating/joining rooms.0 -
What error do you get on the unity side in the console / log, whats in the photon server logs?
I assume you didn't modify the local master ip / master port in the gameserver config nor in the photonserver config?0 -
My error in Unity: OnFailedToConnectToPhoton, StatusCode: TimeoutDisconnect, so I'm guessing that it connects to the Master Server, but the reroute to the game server goes bonkers.
It doesn't seem to be a firewall issue, as I've disabled Windows Firewall on the host machine.I assume you didn't modify the local master ip / master port in the gameserver config nor in the photonserver config?
Nope, I only changed the public IP of the game servers0 -
It seems I need to wait about 5 minutes after enabling/disabling the firewall, before it actually changes behaviour. I'm now pretty sure that it's a Windows Firewall issue, but don't know what it is, since I've added exceptions for all ports for both UDP and TCP for photonsocketserver.exe.0
-
The issue has been resolved. It was a port forwarding phantom, that now and then allowed me to access the Photon server, and now and then didn't. It's been fixed by the system admin0
-
Glad to read this.0