Cannot start Photon Server

Options
atesakaydin
edited April 2010 in Photon Server
Hello,

I've just installed Photon trial edition. However I cannot start the server. If I try starting it as an application it starts and immidiately shutdowns in 5 seconds. When I check the log I see the following list of messages

--

2760: 16:10:33.0390 - ---
2760: 16:10:33.0390 - Server Starting...
2760: 16:10:33.0390 - Config File: D:\Photon\PhotonServer\src-server\bin_Win32\PhotonSocketServer.xml
2760: 16:10:33.0406 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
2760: 16:10:33.0453 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Version=1.4.0.0, Culture=neutral, PublicKeyToken=02C301B61B060C4D
2760: 16:10:34.0250 - Photon host runtime loaded
2760: 16:10:34.0265 - License is valid.
2760: 16:10:34.0265 - Licensed for 100 concurrent connections.
2760: 16:10:36.0187 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
2760: 16:10:36.0187 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
2760: 16:10:36.0187 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
2760: 16:10:36.0187 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
2760: 16:10:36.0187 - Adding Flash TCP listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
2760: 16:10:36.0187 - Adding Sliverlight TCP listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
2760: 16:10:36.0203 - CService::OnException() - Exception: CSocket::Bind() 127.0.0.1:5055 - Only one usage of each socket address (protocol/network address/port) is normally permitted.

2760: 16:10:36.0203 - Server shutting down...
2760: 16:10:36.0203 - Shutting down socket servers...
2760: 16:10:36.0203 - Shutting down ENet thread pool...
2760: 16:10:36.0203 - Shutting down business logic thread pool...
2760: 16:10:36.0203 - Shutting down I/O thread pool...
2760: 16:10:36.0203 - Flushing buffer allocator...
2760: 16:10:36.0203 - Flushing stream socket allocator...
2760: 16:10:36.0203 - Flushing datagram socket allocator...
2760: 16:10:36.0234 - Shutdown complete...
2760: 16:10:36.0234 - CService::~CService()

--

I've searched the internet for CSocket::Bind exception. It is said in the forums that it might be because of my firewall or there may be other applications using the same port(5055 in this case). All of my firewalls and anti-virus applications are turned off at the moment and my pc runs on local(not connected to lan or internet). I've run netstat with different parameters and I dont see any program which uses port 5055... I have also tried changing this port from config file and still I get the same error. The following line however is duplicated in the log entry

--
2760: 16:10:36.0187 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
--

Which I find very curious.

Afterwards I have tried installing photon as a service(from the tray ui) and running it as a service and this time I get the following windows runtime error:

--

Runtime Error!

Program: D:\Phot...(<probably photon bin path here>)

R6025

-pure virtual function call

--

Anyway... does anyone know the cause of this error?

Comments

  • I've tried again with another pc(the previous one I was using was a laptop)... And I get the exact same errors there as well.
  • Tobias
    Options
    This error is new to me, but I think it can be solved quickly.

    The default IP settings are 0.0.0.0, which makes Photon listen on all locally available IPs. This is setup in the file PhotonSocketServer.xml (in the same folder as PhotonControl.exe) and you can change all IP entries there from 0.0.0.0 to 127.0.0.1 (or any single IP you want Photon to listen to).
  • Erm... Tobias plz dont laugh at me... I had not connected my PC to the network when I tried this :D... It gets resolved with Ethernet connection as I get an IP that way...

    However I believe it should operate on a machine on localhost even without network connection. I haven't tried but 127.0.0.1 would probably fix it as you said.
  • Tobias
    Options
    Thanks for telling us!
    You are right, it should work on localhost anytime. We just never stumbled across this.

    See? I didn't laugh.
    But I cracked a smile :)
  • dreamora
    Options
    from the error I would guess that the problem is that you configured an ip for the normal connection but not the flash / silverlight policy server. At least thats what the log indicates thus also 2 different configured ips