Connect() to 'ns.exitgames.com' failed: System.Net.Sockets.SocketException: Connection timed out

Hi,

I am trying to get PUN working on my simple project. Here is the details:

Unity 2018.1.1f1
PUN 1.90 (https://assetstore.unity.com/packages/tools/network/photon-unity-networking-free-1786)
Build target Android


I simply create a new project, import the PUN from asset store and enter my app id to setup project. Then on running the basic demo through demo hub, I get this error

"Connect() to 'ns.exitgames.com' failed: System.Net.Sockets.SocketException: Connection timed out"

I am not getting any hint where I am doing wrong or missing something. For me, the basic demo should work straight away. Any help is greatly appreciated.

Best Answer

  • Accepted Answer
    I think the issue was with my router settings. I updated the DNS settings of my router and the issue was resolved. Although I accept this solution but I still believe that this should not happen as many players can experience this issue and I can't ask them to check their router settings. So I will keep this for my later research.

Answers

  • Just found out that it works if testing on mobile data, but does not work if connected to wifi. So to confirm its not an issue related to my Wifi, I tested it on different locations as well but same results whenever on Wifi
  • MarkusMarkus admin
    Which country do you connect from?
    Tried with a different ISP?
  • I'm in India right now. Selected region "Asia" and tried 3 different ISPs but same results. And its strange the same project runs well with mobile data
  • So I tried with a VPN service and that seems to work. After I connected to VPN, I was able to connect to Photon. So is there a solution I can connect to Photon without using VPN ?
  • try selecting preferred region in photon server settings . i also live in india never had this issue
  • the issue could mostly be because the website is either blocked by ur company for advisory purposes or there is an issue with the firewall on ur system.Try disabling it
  • edited June 12
    Okay, I just found out that its related to the latest version of Photon SDK. I tried an older build of my game which was created with version 1.88 of Photon SDK and that works on the same network and same device.

    But a new project from scratch is not working on the same network and device.
  • Accepted Answer
    I think the issue was with my router settings. I updated the DNS settings of my router and the issue was resolved. Although I accept this solution but I still believe that this should not happen as many players can experience this issue and I can't ask them to check their router settings. So I will keep this for my later research.
Sign In or Register to comment.