I can not connect to photon cloud or connect to my self hosted server

Options
I have made a game that works fine when I use self hosted server on my own pc(with local ip). I tried to make it online using photon cloud but the server connection times out no matter the server!(eu, us, ...). I tried to use my own hosted server with static ip and port. Therefore, I copied photon server with my licence on my server and run the photon load balancing in server. However, I get server connection time out. Here are the possible problem I think I might have:

- I am from Iran and my ip is problematic (however I tested with VPN and the problem still appears!)
- I could not register my username and password to my server in connectingToMaster of photon and maybe I should login to my server with every client connection ( however, I dont know how it could be done!)

I am waiting for your kind answers.

Best Answer

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @milmilkat,

    Thank you for choosing Photon!

    Let's tackle issues one by one and try to understand what you have tried already.

    Yes, I can confirm that we had previous reports of issues to access Photon Cloud from Iran. Unfortunately, we cannot do much about that.

    You should focus on troubleshooting connection to your self hosted server. See if you can access it from the client machine/network. Try ping and tracert.
    Then do not forget to configure routers and firewalls to allow Photon ports.

    I could not register my username and password to my server in connectingToMaster of photon and maybe I should login to my server with every client connection ( however, I dont know how it could be done!)

    I don't know what are you referring to: custom authentication or sign in to photonengine website?
  • milmilkat
    Options
    Thanks @JohnTube for your prompt answer.

    I can ping my server and it exists! My server is in France and I hope the problem might not be related to existence of my server in France! (TTL = 118!)

    When I tested loadbalancing on my server, the log has problems with it. I don't know if they are related to my problem or not!(On Operation Return: Join Game Failed). But I guess not! since there are also 5 started games with 3 clients.

    I did not set anything for firewall. However, it seems photon has added itself in firewall.(photon socket server[exit games gmbh] and both of public and private marks are checked). Should I add any rule in Microsoft server 2012 rules so that photon can pass firewall?

    After all, I just set my photon settings. I mean self hosted and set my server IP and port and protocol udp and my appID. And used the script (photonnetwork.connectUsingSettings("version 1"))

    I hope I did not miss anything!







  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Did you configure Game Server IP?
    It can be done using Photon Control directly or by modifying config file. You can find more information here.
  • milmilkat
    Options
    Yes, by checking the mark of public and local IP. However, I still get this error:
    TimeoutDisconnect while connecting to .... Check if the server is available.

    I don't know what I am missing!
  • milmilkat
    Options
    @JohnTube My problem is solved!

    I don't know why! But when I changed the port to 5055 instead of my server port it got connected! even if I put 5056 it won't work! I dont know how I get 5055 but it seems it is the default value!

    I am so grateful to you, because of your hints I could find the root of problem.