Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Third Party Photon Server Question

Discussion in 'Multiplayer' started by mayk93, Jun 22, 2015.

  1. mayk93

    mayk93

    Joined:
    May 22, 2015
    Posts:
    7
    Hello,

    I know this is not exactly the best place to ask, but I am really stuck with this, maybe someone here could help me setting up my Photon Server.

    I am following this tutorial here: http://doc.exitgames.com/en/onpremise/current/tutorials/an-app-from-scratch

    I am using Photon Server 3.4.30.9719. I am trying to deploy my own server, as described there. I have build the class library project that I called GameServer in deploy/Gameserver/bin and replaced the servers application configuration with:

    <Applications Default="GameServer">
    <Application
    Name="GameServer"
    BaseDirectory="GameServer"
    Assembly="GameServer"
    Type="GameServer" />​
    </Applications>

    I start the server from Photon Control -> Default -> Start as application. The server runs for 10 to 30 seconds and closes. I checked with the Lite application set as default and when loaded, it did not stop.

    I receive the following log:

    PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: name = 'GameServer' , assemblyName = 'GameServer'
    ApplicationBase = '...\Documents\PhotonServers\1\deploy'
    PrivateBinPath = '...\Documents\PhotonServers\1\deploy\GameServer\bin;bin_Win64;Shared;'
    ConfigurationFile = ''
    CachePath = ''
    ApplicationPath = '...\Documents\PhotonServers\1\deploy\GameServer'
    BinaryPath = '...\Documents\PhotonServers\1\deploy\GameServer\bin'
    ApplicationRootPath = '...\Documents\PhotonServers\1\deploy'
    UnmanagedLogPath = '...\Documents\PhotonServers\1\deploy\bin_Win64\log'
    AssemblyLoadEvent: GameServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null from file:///.../Documents/PhotonServers/1/deploy/GameServer/bin/GameServer.DLL
    Photon SDK:3.4.30.9718
    AssemblyLoadEvent: Photon.SocketServer, Version=3.4.30.9718, Culture=neutral, PublicKeyToken=48c2fa3b6988090e from file:///.../Documents/PhotonServers/1/deploy/GameServer/bin/Photon.SocketServer.DLL
    AssemblyLoadEvent: ExitGamesLibs, Version=1.0.1.0, Culture=neutral, PublicKeyToken=eac0edd9746a4aa0 from file:///.../Documents/PhotonServers/1/deploy/GameServer/bin/ExitGamesLibs.DLL
    AssemblyLoadEvent: System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 from file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    Starting: name = 'GameServer', assemblyName = 'GameServer', typeName = 'GameServer'
    RequestStop: ApplicationName = 'GameServer', DomainId='2' -- calling Application.OnStopRequested()
    RequestStop: ApplicationName = 'DefaultDomain', DomainId='1'
    Stop: ApplicationName = 'GameServer', DomainId='2' -- calling Application.TearDown()
    I have checked and at the paths mentioned by the log, the requested resources ( dlls, etc ) are available there. Could there by anything wrong with my configuration? Why is OnStopRequested called immediately after setup? As for the server code, it is basically the application there, renamed GameServer instead of Chat server. Any suggestions are welcomed!

    Thank you and I apologize for the non Unity question.

    PS: I also asked on the Photon forums: http://forum.exitgames.com/viewtopic.php?f=5&t=6243
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,021
    Thanks a bunch for the cross link!
    I will ask my colleagues to answer there.
     
    mayk93 likes this.
  3. mayk93

    mayk93

    Joined:
    May 22, 2015
    Posts:
    7
    No problem. I managed to solve the problem. I was getting the stop request at setup because the server's Setup() method was throwing an exception.