Could not connect via UDP (Only via TCP)

Ben1911Ben1911
edited April 25 in Photon Server
Hi,

I'm working on my server side project and I configurated all settings right to allow other people connect to my game server. When I said configurated all settings right, I meant that open ports on Windows Firewall, Router Firewall, and no anti-virus or something other that may block this connection.

On canyouseeme.org I can see an open port (a running service - photon server) with TCP but not with UDP.

I tried to see what's going on "netstat" from "cmd.exe" and there is a service which is listening to TCP and UDP:
0) 0.0.0.0:5057 - TCP
1) 10.0.0.2:5057 - UDP (Is remote IP translated to Local IP on communication?)

TCP and UDP configurated on a photon server config to listen on 0.0.0.0 IP.

Any ideas?

Thanks,
Ben.

Comments

  • Hi, @Ben1911

    listener can be attached only on address which belongs to your machine. if 10.0.0.2 does not belong it, then it will not be attached. you may check results in PhotonSocketServer logs, which are in bin_Win64/log folder.

    best,
    ilya

  • Ben1911Ben1911
    edited April 26
    chvetsov said:

    Hi, @Ben1911

    listener can be attached only on address which belongs to your machine. if 10.0.0.2 does not belong it, then it will not be attached. you may check results in PhotonSocketServer logs, which are in bin_Win64/log folder.

    best,
    ilya

    Hi, @chvetsov

    Thanks for your reply. 10.0.0.2 this is IPv4 of my machine. For test purposes, I created a python script with UDP listener to port 5057. Then, I checked netstat (via cmd.exe) and I saw that it's listening to 0.0.0.0:5057 as I have defined.

    I have defined a photon server to listen to 0.0.0.0 IP with 5057 port. But, the issue that is not listening to 0.0.0.0:5057 as specified but to 10.0.0.2:5057 (I checked netstat again) which is incorrect and do not allow to access to photon server via remote IP.

    I copied logs:

    7240: 20:41:58.355 - UDP address specified as: "0.0.0.0" adding listener to each available IPv4 address
    7240: 20:41:58.356 - Adding UDP listener on: 10.0.0.2: 5057 with a listen backlog of: 500
    7240: 20:41:58.356 - Adding UDP listener on: 127.0.0.1: 5057 with a listen backlog of: 500

    So, the issue with photon server that isn't listening to 0.0.0.0:5057 as I have defined on photon server config. As I mentioned before, with TCP - It's working.

    Any ideas?

    Ben.
  • HI, @Ben1911

    Well, 0.0.0.0 means all local address, right? and as you may see from logs that photon sets up listeners to all possible addresses. So, nothing is wrong. everything works as it should

    in order to check that everything is right, you need to start client right on this machine and try to connect either to 10...address or to localhost. if this does not work, then we will try to understand what is wrong.

    if this works, than something wrong with your public access setup. in this case i can hardly help you

    best,
    ilya
Sign In or Register to comment.