First Server Project

samuelthomson
edited March 2012 in Photon Server
Hello, I've been trying to get to grips with the Photon server using the Unity bootcamp demo to create a webplayer-based game. I have the game working on localhost (one PC, 2 browser windows), but I'm totally stumped when it comes to getting it working over the web, or even over a LAN. There are several points that I'm currently failing on, mostly because I've never tried anything like this before.

1. I'm running the Photon Server v3 from my PC. I can see it in the taskbar. When I try to "Run Testclient", I get an error that says "Receiving Failed, SocketException : Connection Reset". The IP/port listed at the top of the page says "127.0.0.100:4530". I've run a test using "canyouseeme.org" that tells me this port is open. Also, this is a static IP address I set using windows.

2. Some ports don't seem to be open. When I check using "canyouseeme.org", ports 5055 and 3389 aren't open. I've tried changing my Router's virtual servers to forward these ports to the static IP I mentioned, but it doesn't seem to make a difference.

I've turned off my anti-virus software and windows firewall. I really don't know what else to try.

Lastly, I should say that I'm trying to get the "Run Testclient" working because I understand this uses the same mechanism as the Unity webplayer that I'm trying to set up. If the testclient works, then I should be able to use my computer as a server to run the bootcamp demo accross the web. If I have this wrong, please let me know.

Comments

  • 127.0.0.xxxx can't be the right IP for an in LAN machine. Thats loopback space.
    Check the machines connection status, it will likely be 192.168.1.x or 192.168.0.x - thats the IP to which you would need to forward it, assuming you have to specify an IP not a machine name (which is even more stable within such an environment)
  • Thanks for replying on this, its really appreciated. I guess there are some things that I might have got confused. I've been trying to do a straightforward build of the Bootcamp demo today to see if I can get anywhere. Again, it works on a local host fine, but I can't get it to run over the web or LAN. There is a line in the documentation that says
    "If photon is started on another machine: Set new Photon IP and Port in \Assets\Photon\Game.cs line 33 (default is localhost)"

    I've tried the following IP/host details in this line:
    public string ipPort = "**.**.***.***:5055"; (private IP for another persons PC in another part of the country)
    public string ipPort = "127.0.0.1:5055";
    public string ipPort = "192.168.1.100:5055";

    Are any of these likely to work/obviously wrong?

    If its just to work over a LAN, do I need to include the port address, or should I just use:
    public string ipPort = "192.168.1.100";
  • ipport always needs the :5055

    in addition, for anyone outside your local lan, you need to setup portforward on the router to the right machine for UDP port 5055, if its a unity webplayer / flash / silverlight, additionally for tcp 843 and 943

    also ensure that software firewall / windows firewall are setup to allow the photonsocketserver to act as server at all for these ports
  • thats strange, I've built a version using "192.168.1.100:5055", which is the address I have the server running on, but I can't connect from any of the other computers in my local network. I built using Webplayer with the "streamed" checkbox ticked. I have "Photon Instance 1" running.

    Is it possible that I'm not running the socket server correctly? If I go to PhotonServer3>>Deploy>>BIN_WIN64 and try to start PhotonSocketServer.exe I get a "publisher could not be verified" box... I click "OK" but then nothing much seems to happen
  • Also, If I build a version with the loopback settings ("127.0.0.1:5055") should anyone with a PC be able to join/start rooms from the webplayer?
  • Room creation is possible for all (or nobody but server side code only), so yes.
  • Ok, thanks for this dreamora, I really apreciate the help and advice and I got it working ^_^