only my computer can connect to photon server
Options
GB_2102
✭
Hi,there
Problem Abstract
I have 4 clients to connect to self-hosted Photon Server, the results are as follows:
Client 1(a cloud server,I had played PUBG on this server), fail
Client 2(a cloud server,all ports opened), fail
Client 3(a cloud server,unused), fail
Client 4(my computer), succeed
Have no idea why...
Here are the details:
Demo
I am using PUN2 Asteroid demo
What did I changed in this demo
I only add a "GetPing.cs" in game scene to see how much lag from my server(one single line:PhotonNetwork.GetPing)
How this problem occured
I had sent the build game to 3 different windows servers(In this test they were clients), and then I use remote desktop to run the demo on those servers.
What did these 3 servers(In this test they were clients) do in my daily life
The 1st server is a cloud game server, it had lots of game set up, it means if my computer harware is not good enough, I can connect to this server to play some 3A games which require higher hardware through remote desktop.
eg: I had played PUBG in this cloud game server successfully.
The 2nd server is a cloud steam's game server, I had deployed a server for the steam game "Insurgency" , it now has 25 players on my server, and the server provider told me that all the ports in this server had opened.
The 3rd server is a cloud server, I leave it unused.
How I connect to photon server
I set photon server ip config to "Auto detect ip", and write the server ip in "PhotonNetworkSettings", using port 5055.
Only when I run game in my computer could connect to the photon server, others can't, it will show “Connecting to Master Server" and then is says "Disconnected".
My thoughts
First I think it is mostly the firewall problem, but the 2rd server had opend all ports... ...
so currently I have no idea why...
Thanks
Thanks to anyone who could help me, really appreciate!
Problem Abstract
I have 4 clients to connect to self-hosted Photon Server, the results are as follows:
Client 1(a cloud server,I had played PUBG on this server), fail
Client 2(a cloud server,all ports opened), fail
Client 3(a cloud server,unused), fail
Client 4(my computer), succeed
Have no idea why...
Here are the details:
Demo
I am using PUN2 Asteroid demo
What did I changed in this demo
I only add a "GetPing.cs" in game scene to see how much lag from my server(one single line:PhotonNetwork.GetPing)
How this problem occured
I had sent the build game to 3 different windows servers(In this test they were clients), and then I use remote desktop to run the demo on those servers.
What did these 3 servers(In this test they were clients) do in my daily life
The 1st server is a cloud game server, it had lots of game set up, it means if my computer harware is not good enough, I can connect to this server to play some 3A games which require higher hardware through remote desktop.
eg: I had played PUBG in this cloud game server successfully.
The 2nd server is a cloud steam's game server, I had deployed a server for the steam game "Insurgency" , it now has 25 players on my server, and the server provider told me that all the ports in this server had opened.
The 3rd server is a cloud server, I leave it unused.
How I connect to photon server
I set photon server ip config to "Auto detect ip", and write the server ip in "PhotonNetworkSettings", using port 5055.
Only when I run game in my computer could connect to the photon server, others can't, it will show “Connecting to Master Server" and then is says "Disconnected".
My thoughts
First I think it is mostly the firewall problem, but the 2rd server had opend all ports... ...
so currently I have no idea why...
Thanks
Thanks to anyone who could help me, really appreciate!
0
Answers
-
hi, @GB_2102
if you are at home then usually you use a router to connect your ISP. this router creates internal network that is not accessible from outside if there is no port forwarding setup. also this router has public IP accessible from internet, not your machine.
so, what you have to do is setup port forwarding for photon ports. Then detect you public IP(the routers ip) and use it to connect to your game
best,
Ilya0 -
hi, @GB_2102
if you are at home then usually you use a router to connect your ISP. this router creates internal network that is not accessible from outside if there is no port forwarding setup. also this router has public IP accessible from internet, not your machine.
so, what you have to do is setup port forwarding for photon ports. Then detect you public IP(the routers ip) and use it to connect to your game
best,
Ilya
The Photon Server is not deloyed on my computer, it had deployed on another cloud server on internet.
I have a lot of cloud servers indeed.0