Problem starting the Photon Server

SimplyZ
edited June 2011 in Photon Server
When i start the server i get the following error:
5600: 01:02:43.274 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
5600: 01:02:43.276 - Adding UDP listener on :**.***.**.213: 5055 with a listen backlog of: 500
5600: 01:02:43.276 - Adding UDP listener on :**.***.**.213: 5055 with a listen backlog of: 500
5600: 01:02:43.276 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
5600: 01:02:43.276 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
5600: 01:02:43.276 - TCP inactivity timeout: 5000ms
5600: 01:02:43.276 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
5600: 01:02:43.276 - TCP inactivity timeout: 5000ms
5600: 01:02:43.290 - CService::OnException() - Exception: CSocket::Bind() **.***.**.213:5055 - Only one usage of each socket address (protocol/network address/port) is normally permitted.
5600: 01:02:43.290 - Server shutting down...

(The stars represent real numbers, but I masked then 'cause they're my real ip)

Now i understand this much:
The problem is happening at these lines:
5600: 01:02:43.276 - Adding UDP listener on :**.***.**.213: 5055 with a listen backlog of: 500
5600: 01:02:43.276 - Adding UDP listener on :**.***.**.213: 5055 with a listen backlog of: 500
This is because the server tries to use the same address twice. But what I don't know is how to fix this.

So does anyone know how to fix this?
Any help is greatly appreciated!!

Comments

  • did you start the server two times, or did you configure multiple UDP listeners with same IP or with 0.0.0.0 ?
    please post your PhotonServer.config.
  • Here's the config, thanks for helping.
    <?xml version="1.0" encoding="Windows-1252"?>
    	<!--
    	(c) 2010 by Exit Games GmbH, http://www.exitgames.com
    	Photon server configuration file.
    	For details see the photon-config.pdf.
    	-->
    
    <Configuration>
    	<!-- Multiple instances are supported. Each instance has its own node in the config file. -->
    	<!-- PhotonControl will currently only start "Instance1" but the .cmd files could be modified to start other instances. -->
    
    	<!-- Instance settings -->
    	<Instance1
    		EnablePerformanceCounters = "true"
    		DataSendingDelayMilliseconds="50"
    		AckSendingDelayMilliseconds="50"
    		PerPeerMaxReliableDataInTransit="16384"
    		PerPeerTransmitRateLimitKBSec="128"
    		MaxQueuedDataPerPeer="65536"
    		MinimumTimeout="5000"
    		MaximumTimeout="30000">
    		<IOPool/>
    
    		<ThreadPool
    			InitialThreads="4"
    			MinThreads="4"
    			MaxThreads="4">
    		</ThreadPool>
    
    		<!-- Using the same value for initial, min and max makes the pool fixed size, which allows optimizations. -->
    		<ENetThreadPool
    			InitialThreads="2"
    			MinThreads="2"
    			MaxThreads="2">
    		</ENetThreadPool>
    
    		<!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->
    		<!-- Port 5055 is Photon's default for UDP connections. -->
    		<UDPListeners>
    			<UDPListener
    				IPAddress="0.0.0.0"
    				Port="5055">
    			</UDPListener>
    		</UDPListeners>
        
    		<!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->
    		<!-- Port 4530 is Photon's default for TCP connecttions. -->
    		<TCPListeners>
    			<TCPListener
    				IPAddress="0.0.0.0"
    				Port="4530"
    				DisableNagle="true"
    				InactivityTimeout="5000">
    			</TCPListener>
    		</TCPListeners>
    
    		<!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943)  -->
    		<TCPPolicyListeners>
    			<!-- multiple Listeners allowed for different ports -->
    			<TCPPolicyListener
    				IPAddress="0.0.0.0"
    				Port="843"
    				Application="Policy"
    				InactivityTimeout="5000">
    			</TCPPolicyListener>
    			<TCPPolicyListener
    				IPAddress="0.0.0.0"
    				Port="943"
    				Application="Policy"
    				InactivityTimeout="5000">
    			</TCPPolicyListener>
    		</TCPPolicyListeners>
    
    		<!-- Defines the Photon Runtime Assembly to use. -->
    		<Runtime
    			Assembly="PhotonHostRuntime, Version=2.0.0.0, Culture=neutral"
    			Type="PhotonHostRuntime.PhotonDomainManager">
    		</Runtime>
    
    
    		<!-- Defines which applications are loaded on start and which of them is used by default. Make sure the default application is defined. -->
    		<!-- Application-folders must be located in the same folder as the bin_win32 folders. The BaseDirectory must include a "bin" folder. -->
    		<Applications Default="Lite">
    			<!-- Lite Application -->
    			<Application
    				Name="Lite"
    				BaseDirectory="Lite\Lite"
    				Assembly="Lite"
    				Type="Lite.LiteApplication"
    				EnableAutoRestart="true"
    				WatchFiles="dll;config"
    				ExcludeFiles="log4net.config">
    			</Application>
    
    			<!-- LiteLobby Application -->
    			<Application
    				Name="LiteLobby"
    				BaseDirectory="LiteLobby\LiteLobby"
    				Assembly="LiteLobby"
    				Type="LiteLobby.LiteLobbyApplication"
    				EnableAutoRestart="true"
    				WatchFiles="dll;config"
    				ExcludeFiles="log4net.config">
    			</Application>
    
    			<!-- MMO Demo Application -->
    			<Application
    				Name="MmoDemo"
    				BaseDirectory="Mmo\Photon.MmoDemo.Server"
    				Assembly="Photon.MmoDemo.Server"
    				Type="Photon.MmoDemo.Server.PhotonApplication"
    				EnableAutoRestart="true"
    				WatchFiles="dll;config"
    				ExcludeFiles="log4net.config">
    			</Application>
    			
    			<!-- CounterPublisher Application -->
    			<Application
    				Name="CounterPublisher"
    				BaseDirectory="CounterPublisher"
    				Assembly="CounterPublisher"
    				Type="Photon.CounterPublisher.Application"
    				EnableAutoRestart="true"
    				WatchFiles="dll;config"
    				ExcludeFiles="log4net.config">
    			</Application>	
    
    			<!-- Flash & Silverlight Policy Server -->
    			<Application
    				Name="Policy"
    				BaseDirectory="Policy\Policy.Application"
    				Assembly="Policy.Application"
    				Type="Exitgames.Realtime.Policy.Application.Policy">
    			</Application>
    		</Applications>
    	</Instance1>
    </Configuration>
    
  • it looks as if you have the **.***.**.213 IP twice in your system.
    Did you manually configure the same IP on two network cards?
    Or does your machine have two network cards where each network card is connected to a different subnet and each got the same IP assigned?
  • Well, my server computer only got one network card and one ip (that i know of). But i got one other computer connected to the same router. is that computer interfering by any chance?
  • no.. other computers don't cause a problem.
    When configuring IP 0.0.0.0 Photon iterates through all network cards and all their IPs.
    For some reason it found this IP twice, don't know why.
    To work around try setting your IP instead of 0.0.0.0 in the config file.
  • I know that i can put my ip there. Problem is that I got a dynamic ip. And I don't wanna set my ip each time it changes.

    But nvm that, I've found a way to work around that using services from http://http://www.dyndns.com/

    Thanks for your help. :)