Photon Server cannot Start

Hi all,

I am a newbie to photon server. I followed the instruction on Starting Photon in 5 Minutes. When I start LoadBalancing as an application, the server starts for few seconds then it shut down and throw some exceptions. The exceptions are shown as following:
14536: 15:35:49.925 - Service is running...
14536: 15:35:50.181 - CounterPublisher:4 - PhotonRunning() failed. Exception:
System.Net.Sockets.SocketException (0x80004005): A socket operation was attempted to an unreachable host 255.255.255.255:40001
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Sockets.UdpClient.Connect(IPEndPoint endPoint)
   at ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.CreateSender(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\PhotonBinaryWriterBase.cs:line 138
   at ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter..ctor(PacketWriterSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\Photon\Binary\PhotonBinaryWriter.cs:line 60
   at ExitGames.Diagnostics.Monitoring.CounterSampleSender.CreateWriter(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 60
   at ExitGames.Diagnostics.Monitoring.CounterSampleSender..ctor(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 50
   at Photon.SocketServer.Diagnostics.CounterPublisher..ctor(CounterPublisherSettings settings) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 96
   at Photon.SocketServer.Diagnostics.CounterPublisher.Nested..cctor() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 39
 at...
System.TypeInitializationException: The type initializer for 'Nested' threw an exception. ---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable host 255.255.255.255:40001
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at System.Net.Sockets.UdpClient.Connect(IPEndPoint endPoint)
   at ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.CreateSender(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\PhotonBinaryWriterBase.cs:line 138
   at ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter..ctor(PacketWriterSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\Photon\Binary\PhotonBinaryWriter.cs:line 60
   at ExitGames.Diagnostics.Monitoring.CounterSampleSender.CreateWriter(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 60
   at ExitGames.Diagnostics.Monitoring.CounterSampleSender..ctor(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 50
   at Photon.SocketServer.Diagnostics.CounterPublisher..ctor(CounterPublisherSettings settings) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 96
   at Photon.SocketServer.Diagnostics.CounterPublisher.Nested..cctor() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 39
   --- End of inner exception stack trace ---
   at Photon.CounterPublisher.Application.Setup() in d:\dev\photon-socketserver-sdk_cloud\src-server\CounterPublisher\Application.cs:line 57
   at Photon.SocketServer.ApplicationBase.PhotonHostRuntimeInterfaces.IPhotonControl.OnPhotonRunning() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\ApplicationBase.cs:line 1189
   at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.PhotonRunning()
   at PhotonHostRuntime.PhotonDomainManager.PhotonRunning()
14536: 15:35:50.188 - CService::OnException() - Exception: CManagedHost::PhotonRunning() - Failed in AppDomain: 4 - Unspecified error
14536: 15:35:50.188 - Server shutting down...
I reinstalled .NET Framework 3.5 according to the post here but it doesn't help. Does anyone have ideas about this problem?

Thanks in advance!

Comments

  • hi, @IWBM

    Either disable counters publishing in config or set another address

    best,
    ilya
  • chvetsov said:

    hi, @IWBM

    Either disable counters publishing in config or set another address

    best,
    ilya

    Hi ilya,

    Could you please tell me which config file? I cannot find anything about counter publishing or ip address in file PhotonControl.exe.config. Btw, I set in CounterPublisher.dll.config. It doesn't help.

    Best,
    Qinzhu
  • I also tried to disable Counter Publishser in Photo.LoadBalancing.dll.config in GameSever and MasterServer
      
        
          
        
      
    It doesn't work
  • Hi @IWBM,

    Thank you for choosing Photon!

    Try getting rid of Photon CountersPublisher application altogether in "deploy/bin_XXX/PhotonServer.config".

    remove or comment this out:
    			
    			
    				
  • JohnTube said:

    Hi @IWBM,

    Thank you for choosing Photon!

    Try getting rid of Photon CountersPublisher application altogether in "deploy/bin_XXX/PhotonServer.config".

    remove or comment this out:

    			
    			
    				
    I commented those lines out. The error is gone but another error shows up
    22240: 16:59:24.405 - Service is running...
    22240: 16:59:27.703 - Game:3 - PhotonRunning() failed. Exception:
    System.Net.Sockets.SocketException (0x80004005): A socket operation was attempted to an unreachable host 255.255.255.255:40001
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.Net.Sockets.UdpClient.Connect(IPEndPoint endPoint)
       at ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.CreateSender(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\PhotonBinaryWriterBase.cs:line 138
       at ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter..ctor(PacketWriterSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\Photon\Binary\PhotonBinaryWriter.cs:line 60
       at ExitGames.Diagnostics.Monitoring.CounterSampleSender.CreateWriter(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 60
       at ExitGames.Diagnostics.Monitoring.CounterSampleSender..ctor(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 50
       at Photon.SocketServer.Diagnostics.CounterPublisher..ctor(CounterPublisherSettings settings) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 96
       at Photon.SocketServer.Diagnostics.CounterPublisher.Nested..cctor() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 39
     at...
    System.TypeInitializationException: The type initializer for 'Nested' threw an exception. ---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable host 255.255.255.255:40001
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at System.Net.Sockets.UdpClient.Connect(IPEndPoint endPoint)
       at ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.CreateSender(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\PhotonBinaryWriterBase.cs:line 138
       at ExitGames.Diagnostics.Monitoring.Protocol.Photon.Binary.PhotonBinaryWriter..ctor(PacketWriterSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\Protocol\Photon\Binary\PhotonBinaryWriter.cs:line 60
       at ExitGames.Diagnostics.Monitoring.CounterSampleSender.CreateWriter(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 60
       at ExitGames.Diagnostics.Monitoring.CounterSampleSender..ctor(CounterSampleSenderSettings s) in c:\(Work)\(EG)\exitgames-libs\src\Core\Diagnostics\Monitoring\CounterSampleSender.cs:line 50
       at Photon.SocketServer.Diagnostics.CounterPublisher..ctor(CounterPublisherSettings settings) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 96
       at Photon.SocketServer.Diagnostics.CounterPublisher.Nested..cctor() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Diagnostics\CounterPublisher.cs:line 39
       --- End of inner exception stack trace ---
       at Photon.LoadBalancing.GameServer.GameApplication.Setup() in d:\dev\photon-socketserver-sdk_cloud\src-server\LoadBalancing\LoadBalancing\GameServer\GameApplication.cs:line 348
       at Photon.SocketServer.ApplicationBase.PhotonHostRuntimeInterfaces.IPhotonControl.OnPhotonRunning() in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\ApplicationBase.cs:line 1189
       at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.PhotonRunning()
       at PhotonHostRuntime.PhotonDomainManager.PhotonRunning()
    22240: 16:59:27.703 - CService::OnException() - Exception: CManagedHost::PhotonRunning() - Failed in AppDomain: 3 - Unspecified error
    22240: 16:59:27.703 - Server shutting down...
    It seems something wrong with game server. I dont know how to change the ip address.
  • Hi @IWBM,

    There is something wrong with your configuration.
    Double check that you disabled CounterPublisher from GameServer configuration ("deploy\Loadbalancing\GameServer\bin\Photon.LoadBalancing.dll.config").
    Stop and restart Photon Server.

    If this issue persists, retry from the beginning: extract SDK into a new folder and start from there.
  • Hi @JohnTube mod,

    I followd what you said and I repeated it several times. It still doesn't work.
  • Hi, @IWBM
    I'm not sure what is wrong with your machine, but could you just replace `udp://255.255.255.255:40001` with something like this `udp://127.0.0.1:40001` and check again?

    best,
    ilya
  • Hi @JohnTube @chvetsov ,

    Thanks for your help. I solved the problem. It is not because of counter publisher or wrong ip address. It is because of my .Net framework. I didn't install all components of .Net framework. After I installed all of them, the problem is gone and I can run photoncontrol properly now.
  • Good to know.
    Thanks for the update.
Sign In or Register to comment.