I got this error: Failed in AppDomain

Options
pus2meong
edited August 2012 in Photon Server
Hi, I already download the latest photon server.

When I run the service, everything is normal, service is running. But then, this message is appear:
3316: 12:57:23.703 - CService::OnException() - Exception: CManagedHost::PhotonRunning() - Failed in AppDomain: 5 - An error occurred creating the configuration section handler for Photon: Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (E:\Programs\Photon Server\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\CounterPublisher\bin\CounterPublisher.dll.config line 5)
3316: 12:56:58.500 - ---
3316: 12:56:58.500 - Service: "Photon Socket Server" starting
3316: 12:56:58.500 - Config File: E:\Programs\Photon Server\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\bin_Win32_xp\PhotonServer.config
3316: 12:56:58.578 - Will produce at most: 10 crash dumps
3316: 12:56:58.578 -
3316: 12:56:58.578 - WARNING: ***************************************************************
3316: 12:56:58.578 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
3316: 12:56:58.578 - WARNING: Performance will not be as good as when built for Windows Vista or later.
3316: 12:56:58.578 - WARNING: ***************************************************************
3316: 12:56:58.578 -
3316: 12:56:58.578 - Server Starting...
3316: 12:56:58.593 - Tick count: 3970156 (wraps in: 49.6643 days)
3316: 12:56:58.593 - Photon Version: 3.0.15.1343
3316: 12:56:58.593 - PID: 2940
3316: 12:56:58.609 - Config File: E:\Programs\Photon Server\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\bin_Win32_xp\PhotonServer.config
3316: 12:56:58.656 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
3316: 12:56:58.656 - Max message size: 512000
3316: 12:56:58.671 - S2S: MaxInboundMessageSize: 512000
3316: 12:56:58.671 - S2S: MaxOutboundMessageSize: 512000
3316: 12:56:58.671 - S2S: No inactivity timeout
3316: 12:56:58.734 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
3316: 12:56:58.734 - Per peer bandwidth limit
3316: 12:56:58.734 - Transmit Rate Limit: 256 KB/Sec
3316: 12:56:58.734 - Limit period: 200ms
3316: 12:56:58.734 - Limit per period: 52428 bytes
3316: 12:56:58.734 - Max queued data for transmission per peer: 512000 bytes
3316: 12:56:58.734 - Minimum retransmit timeout: 200
3316: 12:56:58.734 - Minimum ENet timeout: 5000ms
3316: 12:56:58.734 - Maximum ENet timeout: 30000ms
3316: 12:56:58.734 - Outbound ENet: MaxInboundMessageSize: 512000
3316: 12:56:58.734 - Outbound ENet: MaxOutboundMessageSize: 512000
3316: 12:56:58.890 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Culture=neutral, PublicKeyToken=02C301B61B060C4D
3316: 12:56:58.890 - Optimising event broadcast for 20 or more peers
3316: 12:56:58.937 - About to load CLR - versions available:
3316: 12:56:58.937 - v2.0.50727
3316: 12:56:58.937 - v4.0.30319
3316: 12:56:58.937 - No preference in configuration file, will load latest.
3316: 12:56:58.937 - About to load version: "v4.0.30319"
3316: 12:56:59.375 - Loaded version: "v4.0.30319"
3316: 12:57:08.515 - Photon host runtime loaded
3316: 12:57:08.593 - License is valid.
3316: 12:57:08.593 - Licensed for 100 concurrent connections.
3316: 12:57:08.593 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
3316: 12:57:08.593 - Per peer bandwidth limit
3316: 12:57:08.593 - Transmit Rate Limit: 256 KB/Sec
3316: 12:57:08.593 - Limit period: 200ms
3316: 12:57:08.593 - Limit per period: 52428 bytes
3316: 12:57:08.593 - Max queued data for transmission per peer: 512000 bytes
3316: 12:57:08.593 - Minimum retransmit timeout: 200
3316: 12:57:08.593 - Minimum ENet timeout: 5000ms
3316: 12:57:08.593 - Maximum ENet timeout: 30000ms
3316: 12:57:08.593 - CENetHost: Using Timer Wheel
3316: 12:57:08.593 - About to load application: Lite from Lite
3316: 12:57:08.593 - Auto restart is enabled for application
3316: 12:57:08.593 - Application will restart 1000ms after the last change detected
3316: 12:57:08.593 - Application will restart if files matching the following are changed: "dll;config"
3316: 12:57:08.593 - Application will NOT restart if files matching the following are changed: "log4net.config"
3316: 12:57:12.656 - Application: "Lite" started in app domain: 2
3316: 12:57:12.656 - About to load application: LiteLobby from LiteLobby
3316: 12:57:12.656 - Auto restart is enabled for application
3316: 12:57:12.656 - Application will restart 1000ms after the last change detected
3316: 12:57:12.656 - Application will restart if files matching the following are changed: "dll;config"
3316: 12:57:12.656 - Application will NOT restart if files matching the following are changed: "log4net.config"
3316: 12:57:15.203 - Application: "LiteLobby" started in app domain: 3
3316: 12:57:15.203 - About to load application: MmoDemo from Photon.MmoDemo.Server
3316: 12:57:15.203 - Auto restart is enabled for application
3316: 12:57:15.203 - Application will restart 1000ms after the last change detected
3316: 12:57:15.203 - Application will restart if files matching the following are changed: "dll;config"
3316: 12:57:15.203 - Application will NOT restart if files matching the following are changed: "log4net.config"
3316: 12:57:17.562 - Application: "MmoDemo" started in app domain: 4
3316: 12:57:17.562 - About to load application: CounterPublisher from CounterPublisher
3316: 12:57:17.562 - Auto restart is enabled for application
3316: 12:57:17.562 - Application will restart 1000ms after the last change detected
3316: 12:57:17.562 - Application will restart if files matching the following are changed: "dll;config"
3316: 12:57:17.562 - Application will NOT restart if files matching the following are changed: "log4net.config"
3316: 12:57:19.968 - Application: "CounterPublisher" started in app domain: 5
3316: 12:57:19.968 - About to load application: Policy from Policy.Application
3316: 12:57:21.515 - Application: "Policy" started in app domain: 6
3316: 12:57:21.515 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
3316: 12:57:21.515 - TCP inactivity timeout: 5000ms
3316: 12:57:21.515 - MaxInboundMessageSize: 512000
3316: 12:57:21.515 - MaxOutboundMessageSize: 512000
3316: 12:57:21.562 - MaxInboundMessageSize: 512000
3316: 12:57:21.562 - MaxOutboundMessageSize: 512000
3316: 12:57:21.562 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
3316: 12:57:21.562 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
3316: 12:57:21.562 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
3316: 12:57:21.562 - TCP inactivity timeout: 1000ms
3316: 12:57:21.562 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
3316: 12:57:21.562 - TCP inactivity timeout: 1000ms
3316: 12:57:21.562 - Adding WebSocket TCP listener on :0.0.0.0: 9090 with a listen backlog of: 150
3316: 12:57:21.562 - Nagle disabled
3316: 12:57:21.562 - TCP inactivity timeout: 10000ms
3316: 12:57:21.562 - MaxInboundMessageSize: 512000
3316: 12:57:21.562 - MaxOutboundMessageSize: 512000
3316: 12:57:21.562 - Forcing all applications ids to: "Lite"
3316: 12:57:21.734 - Service is running...
3316: 12:57:23.703 - CService::OnException() - Exception: CManagedHost::PhotonRunning() - Failed in AppDomain: 5 - An error occurred creating the configuration section handler for Photon: Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (E:\Programs\Photon Server\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\CounterPublisher\bin\CounterPublisher.dll.config line 5)
3316: 12:57:23.703 - Server shutting down...
3316: 12:57:23.703 - Notifying CLR applications of shutdown...
3316: 12:57:23.718 - Shutting down TCP Outbound Connection Manager...
3316: 12:57:23.718 - Shutting down ENet Outbound Connection Manager...
3316: 12:57:23.718 - Disconnecting all outbound peers...
3316: 12:57:23.718 - Shutting down ENet host...
3316: 12:57:23.718 - Disconnecting all peers...
3316: 12:57:23.718 - Shutting down socket servers...
3316: 12:57:23.734 - Shutting down ENet thread pool...
3316: 12:57:23.734 - Shutting down TCP inactivity timers...
3316: 12:57:23.750 - WaitingForShutdownToComplete: TCP:0.0.0.0:4530
3316: 12:57:23.750 - OnShutdownCompleted: TCP:0.0.0.0:4530
3316: 12:57:23.750 - WaitingForShutdownToComplete: TCPPolicy:0.0.0.0:843
3316: 12:57:23.765 - OnShutdownCompleted: TCPPolicy:0.0.0.0:843
3316: 12:57:23.765 - WaitingForShutdownToComplete: TCPPolicy:0.0.0.0:943
3316: 12:57:23.765 - OnShutdownCompleted: TCPPolicy:0.0.0.0:943
3316: 12:57:23.765 - WaitingForShutdownToComplete: UDP:127.0.0.1:5055
3316: 12:57:23.765 - OnShutdownCompleted: UDP:127.0.0.1:5055
3316: 12:57:23.765 - WaitingForShutdownToComplete: WebSocket:0.0.0.0:9090
3316: 12:57:23.765 - OnShutdownCompleted: WebSocket:0.0.0.0:9090
3316: 12:57:23.765 - Shutting down CLR applications...
3316: 12:57:23.765 - Shutting down business logic thread pool...
3316: 12:57:23.765 - Shutting down I/O thread pool...
3316: 12:57:23.781 - Flushing ENET buffer allocator...
3316: 12:57:23.781 - Flushing TCP buffer allocator...
3316: 12:57:23.781 - Flushing TCP buffer handle allocator...
3316: 12:57:23.781 - Flushing stream socket allocator...
3316: 12:57:23.781 - Flushing inbound datagram socket allocator...
3316: 12:57:23.781 - Flushing outbound datagram socket allocator...
3316: 12:57:23.781 - Destroying ENet thread pool
3316: 12:57:23.781 - Destroying Business logic thread pool
3316: 12:57:23.781 - Destroying servers
3316: 12:57:23.781 - Destroying TCP Outbound Connection Manager
3316: 12:57:23.781 - Destroying resolver
3316: 12:57:23.781 - Destroying TCP Proxy Connection Manager
3316: 12:57:23.781 - Destroying TCP inactivity timer
3316: 12:57:23.781 - Destroying ENet host
3316: 12:57:23.781 - Destroying ENet host
3316: 12:57:23.781 - Destroying CLR dispatcher
3316: 12:57:23.781 - Destroying CLR applications
3316: 12:57:23.843 - Destroying I/O thread pool
3316: 12:57:23.843 - Destroying ENet buffer allocator
3316: 12:57:23.843 - Destroying TCP buffer allocator
3316: 12:57:23.843 - Destroying TCP socket allocator
3316: 12:57:23.843 - Destroying ENet inbound socket allocator
3316: 12:57:23.843 - Destroying ENet outbound socket allocator
3316: 12:57:23.843 - Destroying performance counters
3316: 12:57:23.875 - Shutdown complete...


I run Photon Server windows xp 32 in my laptop (localhost).
Anyone can help me?

Comments

  • Hello,
    this looks strange - I have not seen this error before, and I can not exactly reproduce it on a Win XP 32 machine, so I can only take a guess.

    - Which .NET versions are installed on your machine? Please install .NET 3.5 (incl. ServicePack 1) if you don't have it yet. I can reproduce similar errors when .NET 3.5 is missing, so that would be the first thing I would look at.
    - Can you please check if the PhotonCLR.log shows an error, too, and post it here please if it contains something suspicious?
    - Are you running Photon under an account with administrator privileges? If not - can you try that, please?

    You can also remove / comment out the CounterPublisher app from the PhotonServer.config, so that we can see if there will be a similar error for the other apps, or if it is only a problem of the CounterPublisher.

    <!--
    <Application
    Name="CounterPublisher"
    BaseDirectory="CounterPublisher"
    Assembly="CounterPublisher"
    Type="Photon.CounterPublisher.Application"
    EnableAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>
    -->

    Please share your solution if you find one, and let me know if you still have trouble, so that we can look into it further.

    And as a side note - we recommend to use Vista / Windows 7 for development, we don't optimize for Windows XP (although we have made some nice improvements for XP / 32bit that will be part of the upcoming Photon 3.0 release ). :)
  • -I got .NET 3.5, I also install .NET 4.0 because one of the test program from the SDK is asking for .net 4.0 when I try to run it. The error already exist before I install .NET 4.0
    When I check the Add & Remove program window from my control panel, here is the list of .NET framework in my computer:
    .NET Framework 2.0 Service Pack 1
    .NET Framework 2.0 Service Pack 2
    .NET Framework 3.5
    .NET Framework 4 Client Profile
    .NET Framework 4 Extended
    .NET Framework 4 Multi Targeting Pack
    Is there any missing framework from the list?
    Since my computer is capable to run UNITY 3D 3.5 and Unity Master Server (localhost server) with all of .NET framework list above, so I don't know where is the problem.

    -I already check PhotonCLR.log. Nothing suspicious (I think). I also running as Administrator. Here is the log
    2012-07-26 21:22:22,828 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created
    2012-07-26 21:22:43,531 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created
    2012-07-26 21:22:43,578 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created
    2012-07-26 21:22:43,656 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - InitializeNewDomain
    2012-07-26 21:22:43,671 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - AppDomains with unhandled exceptions are usually not unloaded and restarted.
    2012-07-26 21:22:43,687 [ 1] INFO eiEixvCAxwawF4KSdt.e0Agie4MfQkhyHt5A3 - ### PhotonHostRuntime.Licensing: Getting license information...
    2012-07-26 21:22:43,703 [ 1] INFO eiEixvCAxwawF4KSdt.e0Agie4MfQkhyHt5A3 - LICENSE: Expiration: 24/08/2012; floating license: no; max connections: 100; valid IPs: any
    2012-07-26 21:22:43,718 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Lite , Lite
    2012-07-26 21:22:43,796 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy
    2012-07-26 21:22:43,812 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Lite;Lite\bin;bin_Win32_xp;Shared
    2012-07-26 21:22:43,828 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\Lite\bin\Lite.dll.config
    2012-07-26 21:22:47,906 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain LiteLobby , LiteLobby
    2012-07-26 21:22:47,921 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy
    2012-07-26 21:22:47,937 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = LiteLobby;LiteLobby\bin;bin_Win32_xp;Shared
    2012-07-26 21:22:47,953 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\LiteLobby\bin\LiteLobby.dll.config
    2012-07-26 21:22:52,453 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain MmoDemo , Photon.MmoDemo.Server
    2012-07-26 21:22:52,500 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy
    2012-07-26 21:22:52,515 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = MmoDemo;MmoDemo\bin;bin_Win32_xp;Shared
    2012-07-26 21:22:52,531 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\MmoDemo\bin\Photon.MmoDemo.Server.dll.config
    2012-07-26 21:22:56,312 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain CounterPublisher , CounterPublisher
    2012-07-26 21:22:56,359 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy
    2012-07-26 21:22:56,375 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = CounterPublisher;CounterPublisher\bin;bin_Win32_xp;Shared
    2012-07-26 21:22:56,390 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\CounterPublisher\bin\CounterPublisher.dll.config
    2012-07-26 21:23:00,828 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Policy , Policy.Application
    2012-07-26 21:23:00,843 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy
    2012-07-26 21:23:00,843 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Policy;Policy\bin;bin_Win32_xp;Shared
    2012-07-26 21:23:00,859 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = I:\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\Policy\bin\Policy.Application.dll.config

    -When Conter Publisher is under the comment mark. The log is saying similar error, the different is, the error is at AppDomain 2
  • Thanks for the update. You are right - you have everything installed that is required to run Photon, and the additional log does not give much additional info. Looks all good so far.
    I'll try to look at your issue more closely next week. In general, I suspect that there is something missing - or better, something special - with your machine, but I hope that we can track it down. :)
  • Okay, thanks. I also try the previous photon version, and still got the same error.
    Meanwhile, I was curious about the config file on the error report. So I was wondering, what happen if I rename the config file?

    So, I rename lite.dll.config into litedll.config

    The AppDomain 2 error is gone, but the error still appear in other AppDomain. So I try to rename all .dll.config by removing the dot. I got no AppDomain error but now, this one is shows up:
    4080: 22:37:28.875 - CService::OnException() - Exception: CSocket::Bind() 127.0.0.1:5055 - Only one usage of each socket address (protocol/network address/port) is normally permitted.
    

    Here is the complete log:

    4080: 22:37:22.531 - Config File: E:\Programs\Photon Server\deploy\bin_Win32_xp\PhotonServer.config
    4080: 22:37:22.531 - Will NOT produce crash dumps
    4080: 22:37:22.531 - ---
    4080: 22:37:22.531 -
    4080: 22:37:22.531 - WARNING: ***************************************************************
    4080: 22:37:22.531 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
    4080: 22:37:22.531 - WARNING: Performance will not be as good as when built for Windows Vista or later.
    4080: 22:37:22.531 - WARNING: ***************************************************************
    4080: 22:37:22.531 -
    4080: 22:37:22.531 - Server Starting...
    4080: 22:37:22.531 - Photon Version: 2.6.7.525
    4080: 22:37:22.531 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
    4080: 22:37:22.593 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Culture=neutral, PublicKeyToken=02C301B61B060C4D
    4080: 22:37:22.593 - About to load CLR - versions available:
    4080: 22:37:22.593 - v2.0.50727
    4080: 22:37:22.593 - v4.0.30319
    4080: 22:37:22.593 - No preference in configuration file, will load latest.
    4080: 22:37:22.593 - About to load version: "v4.0.30319"
    4080: 22:37:22.593 - Loaded version: "v4.0.30319"
    4080: 22:37:23.453 - Photon host runtime loaded
    4080: 22:37:23.468 - License is valid.
    4080: 22:37:23.468 - Licensed for 100 concurrent connections.
    4080: 22:37:23.468 - Max Reliable Data In Transit (awaiting ACKs) per peer : 16384 bytes
    4080: 22:37:23.468 - Per peer bandwidth limit
    4080: 22:37:23.468 - Transmit Rate Limit: 128 KB/Sec
    4080: 22:37:23.468 - Limit period: 250ms
    4080: 22:37:23.468 - Limit per period: 32768 bytes
    4080: 22:37:23.468 - Max queued data for transmission per peer: 65536 bytes
    4080: 22:37:23.468 - Minimum retransmit timeout: 200
    4080: 22:37:23.468 - Minimum ENet timeout: 5000ms
    4080: 22:37:23.468 - Maximum ENet timeout: 30000ms
    4080: 22:37:23.468 - ENetHost: Using Timer Wheel
    4080: 22:37:23.468 - About to load application: Lite from Lite
    4080: 22:37:23.468 - Auto restart is enabled for application
    4080: 22:37:23.468 - Application will restart 10000ms after the last change detected
    4080: 22:37:23.468 - Application will restart if files matching the following are changed: "dll;config"
    4080: 22:37:23.468 - Application will NOT restart if files matching the following are changed: "log4net.config"
    4080: 22:37:24.609 - Application: "Lite" started in app domain: 2
    4080: 22:37:24.609 - About to load application: LiteLobby from LiteLobby
    4080: 22:37:24.609 - Auto restart is enabled for application
    4080: 22:37:24.609 - Application will restart 10000ms after the last change detected
    4080: 22:37:24.609 - Application will restart if files matching the following are changed: "dll;config"
    4080: 22:37:24.609 - Application will NOT restart if files matching the following are changed: "log4net.config"
    4080: 22:37:25.671 - Application: "LiteLobby" started in app domain: 3
    4080: 22:37:25.671 - About to load application: MmoDemo from Photon.MmoDemo.Server
    4080: 22:37:25.671 - Auto restart is enabled for application
    4080: 22:37:25.671 - Application will restart 10000ms after the last change detected
    4080: 22:37:25.671 - Application will restart if files matching the following are changed: "dll;config"
    4080: 22:37:25.671 - Application will NOT restart if files matching the following are changed: "log4net.config"
    4080: 22:37:27.156 - Application: "MmoDemo" started in app domain: 4
    4080: 22:37:27.156 - About to load application: CounterPublisher from CounterPublisher
    4080: 22:37:27.156 - Auto restart is enabled for application
    4080: 22:37:27.156 - Application will restart 10000ms after the last change detected
    4080: 22:37:27.156 - Application will restart if files matching the following are changed: "dll;config"
    4080: 22:37:27.156 - Application will NOT restart if files matching the following are changed: "log4net.config"
    4080: 22:37:28.187 - Application: "CounterPublisher" started in app domain: 5
    4080: 22:37:28.187 - About to load application: Policy from Policy.Application
    4080: 22:37:28.859 - Application: "Policy" started in app domain: 6
    4080: 22:37:28.859 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
    4080: 22:37:28.859 - Nagle disabled
    4080: 22:37:28.859 - TCP inactivity timeout: 5000ms
    4080: 22:37:28.859 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
    4080: 22:37:28.859 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
    4080: 22:37:28.859 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
    4080: 22:37:28.859 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
    4080: 22:37:28.859 - TCP inactivity timeout: 5000ms
    4080: 22:37:28.859 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
    4080: 22:37:28.859 - TCP inactivity timeout: 5000ms
    4080: 22:37:28.875 - CService::OnException() - Exception: CSocket::Bind() 127.0.0.1:5055 - Only one usage of each socket address (protocol/network address/port) is normally permitted.
    4080: 22:37:28.875 - Server shutting down...
    4080: 22:37:28.875 - Shutting down ENet host...
    4080: 22:37:28.875 - Disconnecting all peers...
    4080: 22:37:28.875 - Shutting down socket servers...
    4080: 22:37:28.890 - Shutting down ENet thread pool...
    4080: 22:37:28.890 - Shutting down TCP inactivity timers...
    4080: 22:37:28.890 - Shutting down business logic thread pool...
    4080: 22:37:28.890 - Shutting down I/O thread pool...
    4080: 22:37:28.890 - Flushing ENET buffer allocator...
    4080: 22:37:28.890 - Flushing TCP buffer allocator...
    4080: 22:37:28.890 - Flushing stream socket allocator...
    4080: 22:37:28.890 - Flushing datagram socket allocator...
    4080: 22:37:28.890 - Destroying ENet thread pool
    4080: 22:37:28.890 - Destroying TCP inactivity timer
    4080: 22:37:28.890 - Destroying Business logic thread pool
    4080: 22:37:28.890 - Destroying servers
    4080: 22:37:28.890 - Destroying ENet host
    4080: 22:37:28.890 - Destroying CLR dispatcher
    4080: 22:37:28.890 - Destroying CLR applications
    1632: 22:37:28.906 - CManagedHost::OnDomainUnload() - 5
    4080: 22:37:28.921 - CManagedHost::OnCLRDisabled()
    4080: 22:37:28.968 - Destroying I/O thread pool
    4080: 22:37:28.968 - Destroying ENet buffer allocator
    4080: 22:37:28.968 - Destroying TCP buffer allocator
    4080: 22:37:28.968 - Destroying TCP socket allocator
    4080: 22:37:28.968 - Destroying ENet socket allocator
    4080: 22:37:28.968 - Destroying performance counters
    4080: 22:37:28.968 - Shutdown complete...
  • Tobias
    Options
    > Exception: CSocket::Bind() 127.0.0.1:5055 - Only one usage of each socket address (protocol/network address/port) is normally permitted.

    Could it be you already run one Photon Instance? Check your task manager and also the services.
    If you find something, stop it and you could try to start the new Photon again (with the original naming of the configs).
  • Hi Tobias,
    In the task manager only appear PhotonControl.exe and PhotonSocketServer.exe. And when the error is kick in, PhotonSocketServer.exe is gone from the process tab.

    When you said about the Instance, I realize if I'm not install the applications as a service. There's no instance in the service list. But when I install it, the instance1 is appear.

    I try to run it with the original file name of the config, the AppDomain and socket bind exception is gone, the last log is showing service is running.
    But the weird thing is, the icon still in gray. There is a shutdown message in the log:
    3828: 22:48:08.593 - Shutdown request from PhotonHostRuntime: On startup, license monitor must be available / reachable.
    3828: 22:48:08.593 - Shutdown requested.
    

    I check back the service list, the photon instance status still blank with Startup Type is Automatic. When I try to run it from service list, I got a message window pop out, telling me if the service is running but then stopped.

    Here is the log:
    3312: 22:48:06.015 - ---
    3312: 22:48:06.015 - Service: "Photon Socket Server" starting
    3312: 22:48:06.015 - Config File: E:\Programs\Photon Server\deploy\bin_Win32_xp\PhotonServer.config
    3312: 22:48:06.015 - Will produce at most: 10 crash dumps
    952: 22:48:06.031 -
    952: 22:48:06.031 - WARNING: ***************************************************************
    952: 22:48:06.031 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
    952: 22:48:06.031 - WARNING: Performance will not be as good as when built for Windows Vista or later.
    952: 22:48:06.031 - WARNING: ***************************************************************
    952: 22:48:06.031 -
    952: 22:48:06.031 - Server Starting...
    952: 22:48:06.031 - Tick count: 4869718 (wraps in: 49.6539 days)
    952: 22:48:06.031 - Photon Version: 3.0.15.1343
    952: 22:48:06.031 - PID: 3680
    952: 22:48:06.031 - Current directory is: C:\WINDOWS\system32
    952: 22:48:06.031 - Changing current directory to: E:\Programs\Photon Server\deploy\bin_Win32_xp
    952: 22:48:06.031 - Config File: E:\Programs\Photon Server\deploy\bin_Win32_xp\PhotonServer.config
    952: 22:48:06.031 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
    952: 22:48:06.031 - Max message size: 512000
    952: 22:48:06.031 - S2S: MaxInboundMessageSize: 512000
    952: 22:48:06.031 - S2S: MaxOutboundMessageSize: 512000
    952: 22:48:06.031 - S2S: No inactivity timeout
    952: 22:48:06.031 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
    952: 22:48:06.031 - Per peer bandwidth limit
    952: 22:48:06.031 - Transmit Rate Limit: 256 KB/Sec
    952: 22:48:06.031 - Limit period: 200ms
    952: 22:48:06.031 - Limit per period: 52428 bytes
    952: 22:48:06.031 - Max queued data for transmission per peer: 512000 bytes
    952: 22:48:06.031 - Minimum retransmit timeout: 200
    952: 22:48:06.031 - Minimum ENet timeout: 5000ms
    952: 22:48:06.031 - Maximum ENet timeout: 30000ms
    952: 22:48:06.031 - Outbound ENet: MaxInboundMessageSize: 512000
    952: 22:48:06.031 - Outbound ENet: MaxOutboundMessageSize: 512000
    952: 22:48:06.093 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Culture=neutral, PublicKeyToken=02C301B61B060C4D
    952: 22:48:06.093 - Optimising event broadcast for 20 or more peers
    952: 22:48:06.093 - About to load CLR - versions available:
    952: 22:48:06.093 - v2.0.50727
    952: 22:48:06.093 - v4.0.30319
    952: 22:48:06.093 - No preference in configuration file, will load latest.
    952: 22:48:06.093 - About to load version: "v4.0.30319"
    952: 22:48:06.093 - Loaded version: "v4.0.30319"
    952: 22:48:07.500 - Photon host runtime loaded
    952: 22:48:08.593 - License is valid.
    952: 22:48:08.593 - Licensed for 100 concurrent connections.
    952: 22:48:08.593 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
    952: 22:48:08.593 - Per peer bandwidth limit
    952: 22:48:08.593 - Transmit Rate Limit: 256 KB/Sec
    952: 22:48:08.593 - Limit period: 200ms
    952: 22:48:08.593 - Limit per period: 52428 bytes
    952: 22:48:08.593 - Max queued data for transmission per peer: 512000 bytes
    952: 22:48:08.593 - Minimum retransmit timeout: 200
    952: 22:48:08.593 - Minimum ENet timeout: 5000ms
    952: 22:48:08.593 - Maximum ENet timeout: 30000ms
    952: 22:48:08.593 - CENetHost: Using Timer Wheel
    952: 22:48:08.593 - About to load application: Lite from Lite
    952: 22:48:08.593 - Auto restart is enabled for application
    952: 22:48:08.593 - Application will restart 1000ms after the last change detected
    952: 22:48:08.593 - Application will restart if files matching the following are changed: "dll;config"
    952: 22:48:08.593 - Application will NOT restart if files matching the following are changed: "log4net.config"
    3828: 22:48:08.593 - Shutdown request from PhotonHostRuntime: On startup, license monitor must be available / reachable.
    3828: 22:48:08.593 - Shutdown requested.
    952: 22:48:10.078 - Application: "Lite" started in app domain: 2
    952: 22:48:10.078 - About to load application: LiteLobby from LiteLobby
    952: 22:48:10.078 - Auto restart is enabled for application
    952: 22:48:10.078 - Application will restart 1000ms after the last change detected
    952: 22:48:10.078 - Application will restart if files matching the following are changed: "dll;config"
    952: 22:48:10.078 - Application will NOT restart if files matching the following are changed: "log4net.config"
    952: 22:48:11.687 - Application: "LiteLobby" started in app domain: 3
    952: 22:48:11.687 - About to load application: MmoDemo from Photon.MmoDemo.Server
    952: 22:48:11.687 - Auto restart is enabled for application
    952: 22:48:11.687 - Application will restart 1000ms after the last change detected
    952: 22:48:11.687 - Application will restart if files matching the following are changed: "dll;config"
    952: 22:48:11.687 - Application will NOT restart if files matching the following are changed: "log4net.config"
    952: 22:48:13.171 - Application: "MmoDemo" started in app domain: 4
    952: 22:48:13.171 - About to load application: CounterPublisher from CounterPublisher
    952: 22:48:13.171 - Auto restart is enabled for application
    952: 22:48:13.171 - Application will restart 1000ms after the last change detected
    952: 22:48:13.171 - Application will restart if files matching the following are changed: "dll;config"
    952: 22:48:13.171 - Application will NOT restart if files matching the following are changed: "log4net.config"
    952: 22:48:14.703 - Application: "CounterPublisher" started in app domain: 5
    952: 22:48:14.703 - About to load application: Policy from Policy.Application
    952: 22:48:15.859 - Application: "Policy" started in app domain: 6
    952: 22:48:15.859 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
    952: 22:48:15.859 - TCP inactivity timeout: 5000ms
    952: 22:48:15.859 - MaxInboundMessageSize: 512000
    952: 22:48:15.859 - MaxOutboundMessageSize: 512000
    952: 22:48:15.859 - MaxInboundMessageSize: 512000
    952: 22:48:15.859 - MaxOutboundMessageSize: 512000
    952: 22:48:15.859 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
    952: 22:48:15.875 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
    952: 22:48:15.875 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
    952: 22:48:15.875 - TCP inactivity timeout: 1000ms
    952: 22:48:15.875 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy"
    952: 22:48:15.875 - TCP inactivity timeout: 1000ms
    952: 22:48:15.875 - Adding WebSocket TCP listener on :0.0.0.0: 9090 with a listen backlog of: 150
    952: 22:48:15.875 - Nagle disabled
    952: 22:48:15.875 - TCP inactivity timeout: 10000ms
    952: 22:48:15.875 - MaxInboundMessageSize: 512000
    952: 22:48:15.875 - MaxOutboundMessageSize: 512000
    952: 22:48:15.875 - Forcing all applications ids to: "Lite"
    952: 22:48:15.921 - Service is running...
  • Hi, we have several different issues here... lets see if we can sort it out.

    1.) We have released the Photon 3.0 final, and it contains some fixes + improvements for Win32. I recommend that you download it:
    http://www.exitgames.com/Download/Photon

    2.) Shutdown because license monitor is not reachable (your last entry):
    Photon is validating it's license against a license server. You need to permit outgoing HTTP connections from Photon in your firewall, and make sure that you have network connectivity on your laptop when you start Photon. (It was okay in the first log you posted).

    3.) Removing the [application].dll.config is not a good idea, because the applications require the info from the config files. ;) The config files itself are fine. The "invalid memory access" error happened when the .NET runtime tried to load the assembly in which the config sections are declared, it's an assembly loading issue rather than a config file issue.

    So, can you please check out the latest Photon version, and if you can resolve the license monitor issue, test again as a service & and as an appliation (from my point of view, it should not make much difference)? Let me know how it works, I'm really curious what this issue is, especially because I could not reproduce it yet.

    Thanks for your patience and all the info you provided!
  • Hi, I've downloaded the new version, and everything is working!
    I already test the connection using HelloWorld1 program and the program is connected to the server.

    When I install the service, Photon Service is appear under the name: "Default" (the Instance1 service still there). I run the service ("Default") and the status on the Computer Management is: Started. I try to run directly from the Computer Management, and no error message :D

    About the license monitor, do I need to stay connected to the Internet when the Photon Server is running?

    Thank you for your help :)
  • Tobias
    Options
    > About the license monitor, do I need to stay connected to the Internet when the Photon Server is running?

    If you use a floating license, yes.
    But: Photon 3.0 final starts completely without .license file and then doesn't need a connection. This limits the CCU to 20.
  • Thanks for your feedback! We are very glad to hear that your problems were solved by the Photon 3.0 final version.
    We have renamed the default instance from "Instance1" to "Default", in case you want to remove the "Instance1" service, this should do the trick:
    PhotonSocketServer.exe /remove Instance1