Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by sharkraceclub · May 12 at 10:29 AM ·

Playfab Windows Server with Process no Container

I been able to run Windows Server on my local machine LocalMultiplayerAgent, MultiplayerSettings.json looks like sets EnvironmentVariables but when I deploy this server as process to Playfab it's not working because of this:

LogWindows: Windows GetLastError: The operation completed successfully. (0) LogWindows: Error: === Critical error: === LogWindows: Error: LogWindows: Error: Fatal error: [File:H:/SharkRace/Plugins/PlayFabGSDK/Source/PlayfabGSDK/Private/GSDKInternal.cpp] [Line: 76] LogWindows: Error: Heartbeat endpoint and Server id are required configuration values.

As I see from code it looks for save variables I put in MultiplayerSettings.json:

ConfigSettings.Add(FPlayFabGSDKModule::HEARTBEAT_ENDPOINT_KEY, ConfigPtr->GetHeartbeatEndpoint()); ConfigSettings.Add(FPlayFabGSDKModule::SERVER_ID_KEY, ConfigPtr->GetServerId()); ConfigSettings.Add(FPlayFabGSDKModule::LOG_FOLDER_KEY, ConfigPtr->GetLogFolder()); ConfigSettings.Add(FPlayFabGSDKModule::SHARED_CONTENT_FOLDER_KEY, ConfigPtr->GetSharedContentFolder()); ConfigSettings.Add(FPlayFabGSDKModule::CERTIFICATE_FOLDER_KEY, ConfigPtr->GetCertificateFolder()); ConfigSettings.Add(FPlayFabGSDKModule::TITLE_ID_KEY, ConfigPtr->GetTitleId()); ConfigSettings.Add(FPlayFabGSDKModule::BUILD_ID_KEY, ConfigPtr->GetBuildId()); ConfigSettings.Add(FPlayFabGSDKModule::REGION_KEY, ConfigPtr->GetRegion()); ConfigSettings.Add(FPlayFabGSDKModule::PUBLIC_IP_V4_ADDRESS_KEY, ConfigPtr->GetPublicIpV4Address()); ConfigSettings.Add(FPlayFabGSDKModule::FULLY_QUALIFIED_DOMAIN_NAME_KEY, ConfigPtr->GetFullyQualifiedDomainName());

I understand that if I use container + docker this variables must set (but I had deployed linux version on docker and it wasn't work), question is - do I need to use only container version of server to deploy on playfab or I can somehow to setup process version too?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

7 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by sharkraceclub · 3 days ago

Okay, partially good news. I had deployed Server, what I did is run UnrealPrerequsities.exe file just on server with RDP. This mean I have missing dlls and it looks like I need to place all of them to build, even some VS redist. Or I need somehow to make docker to install this on Windows at least.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Dimitris Gkanatsios · May 12 at 10:48 PM

When you run a game server process integrated with GSDK, the GSDK will try to find these configuration variables from the JSON configuration file that is automatically created both on LocalMultiplayerAgent and on PlayFab.

Not sure why you are having issues. Does your solution run on LocalMultiplayerAgent? If so, it should run on PlayFab with the same settings.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by sharkraceclub · May 13 at 07:41 AM

Hm, all settings about this variables keeps inside MultiplayerSettings.json. I'll try to place this file to my server.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by sharkraceclub · May 13 at 09:46 AM

I did some work, first of all I connected to server with RDP and tried to find logs. It looks like my exe file did not run at all, I tried to just open it with double click and received error ...7b about missing dlls, hm ... thing is I use Unreal build and I can see all dlls in ThirdParty folders, even DLLdInfo shows me path to this directories of use when I test on local machine.

I am confused.

P.S. No need to place any MultiplayerSettings params to server folder, I see Config file correctly created on cloud server.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Dimitris Gkanatsios · May 13 at 04:15 PM

Correct, no need to add any JSON file on the server, this gets created automatically. Sorry if I wasn't clear on that.

For the missing DLLs, check this article Determining required DLLs for Windows game servers - PlayFab | Microsoft Docs

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sharkraceclub · May 18 at 09:33 AM 0
Share

So, updated information. I deployed server as container, not I see that it's trying to run server at least, I described it in similar post here

https://community.playfab.com/questions/62093/gsdk-and-dedicated-unreal-server-not-launching-bot.html?childToView=62324#answer-62324

It works like this:

Following this thread

https://community.playfab.com/questions/61112/playfab-multiplayer-server-stuck-on-pending-heartb.html

I can say that local debug works fine (it termites at the end too but looks like it's defined in settings of json? my server without it should run infinite? ), I need to find reason and looks like only possible solution is to get unreal log somehow. Unreal Engine enables log file to print in console this way Game.exe - log. So it must be somewhere. But I even connected to server with RDP and can't found it (

ylacn.png (101.4 kB)
avatar image sharkraceclub sharkraceclub · May 18 at 10:35 AM 0
Share

GameServer.exe -log -stdout not helps with getting log or I look into wrong place(

avatar image

Answer by sharkraceclub · May 16 at 06:32 AM

Well, yeah, since I don't have container this article helps me a little, as I already mentioned I checked dll list - unreal did all well and placed all dlls to third-parties folders. Looks like I need container anyway.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by sharkraceclub · May 18 at 05:38 PM

Update: I found VM log file with RDP on cloud PC:

It moves to Running

2022-05-18 17:08:43.727 +00:00 [Information] Cleaning up sessionHost a0b4fef2-f6b8-4a55-91c9-9e40c466973b,  instance number 0.
2022-05-18 17:08:43.734 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:08:43.734 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:08:43.734 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:08:43.737 +00:00 [Information] Log parameters: Endpoint: https://neulog5xpdiz5i2lc6k.blob.core.windows.net/gamelogs.
2022-05-18 17:08:43.742 +00:00 [Information] Creating session hosts for missing instance numbers: 0.
2022-05-18 17:08:43.743 +00:00 [Information] Starting process for session host with instance number 0 and process info: FileName - D:\ExtAssets\SH0\A0\SharkRaceServer.exe, Args - - log -stdout.
2022-05-18 17:08:43.743 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:08:43.743 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:08:43.743 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:08:43.743 +00:00 [Information] Creating the configuration file at D:\Config\SH0\gsdkConfig.json
2022-05-18 17:08:43.745 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:08:43.745 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:08:43.745 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:08:43.745 +00:00 [Information] Started process for session host. Instance Number: 0, UniqueId: c6073952-3500-47c2-8d01-f52eb1e5d976, ProcessId: 896
2022-05-18 17:08:43.793 +00:00 [Information] Uploaded a0b4fef2-f6b8-4a55-91c9-9e40c466973b content to https://neulog5xpdiz5i2lc6k.blob.core.windows.net/gamelogs/a0b4fef2-f6b8-4a55-91c9-9e40c466973b.zip in 56ms
2022-05-18 17:08:43.793 +00:00 [Information] Event: UploadedLogs. Properties: NULL, Metrics: {"CompressDuration":1.0,"UploadDuration":56.0,"DeleteDuration":0.0}
2022-05-18 17:08:44.176 +00:00 [Information] Sending heartbeat with correlationId: a539159e-fadc-4c1d-a556-a08f79ede627, body: {"VmState":"Running","AssignmentId":"ffffffff-ffff-ffff-4180-060000000000:2b70c457-43f6-41da-81cc-33a00c8268de:NorthEurope","SessionHostHeartbeatMap":{"c6073952-3500-47c2-8d01-f52eb1e5d976":{"CurrentGameState":"PendingHeartbeat","LastStateTransitionTimeUtc":"2022-05-18T17:08:43.7432194Z","AssignmentId":"ffffffff-ffff-ffff-4180-060000000000:2b70c457-43f6-41da-81cc-33a00c8268de:NorthEurope"}},"SequenceNumber":10,"AgentProcessGuid":"b76939c0-622e-4b31-8572-6f943e1702b5","IsUnassignable":true,"NetworkConfiguration":{"VmName":"226be865-05bd-4c71-ac86-678e1d80805b-AzureBatch-Deployment_0","Endpoints":[{"FrontEndPort":51000,"BackEndPort":29877,"Protocol":"Tcp"},{"FrontEndPort":52000,"BackEndPort":29876,"Protocol":"Tcp"},{"FrontEndPort":56000,"BackEndPort":56002,"Protocol":"Tcp"},{"FrontEndPort":30000,"BackEndPort":30000,"Protocol":"Udp"},{"FrontEndPort":50000,"BackEndPort":3389,"Protocol":"Tcp"}]}

Then go to Too many Restarts

2022-05-18 17:09:13.798 +00:00 [Information] Cleaning up sessionHost e4e64c45-5a71-4531-b699-62629b96e037,  instance number 0.
2022-05-18 17:09:13.801 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:09:13.801 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:09:13.801 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:09:13.801 +00:00 [Information] Log parameters: Endpoint: https://neulog5xpdiz5i2lc6k.blob.core.windows.net/gamelogs.
2022-05-18 17:09:13.802 +00:00 [Information] Creating session hosts for missing instance numbers: 0.
2022-05-18 17:09:13.802 +00:00 [Information] Starting process for session host with instance number 0 and process info: FileName - D:\ExtAssets\SH0\A0\SharkRaceServer.exe, Args - - log -stdout.
2022-05-18 17:09:13.802 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:09:13.802 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:09:13.802 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:09:13.803 +00:00 [Information] Creating the configuration file at D:\Config\SH0\gsdkConfig.json
2022-05-18 17:09:13.803 +00:00 [Information] Event: TimeToEnterLockMs. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToEnterLockMs":0.0}
2022-05-18 17:09:13.804 +00:00 [Information] Event: StartFileWrite. Properties: {"StateType":"VmPersistedState"}, Metrics: {"TimeToStartFileWriteMs":0.0}
2022-05-18 17:09:13.804 +00:00 [Information] Event: UpdatedPersistedState. Properties: {"StateType":"VmPersistedState"}, Metrics: {"Attempt":0.0,"FileWriteDurationMs":0.0,"PersistStateDurationMs":0.0}
2022-05-18 17:09:13.804 +00:00 [Information] Started process for session host. Instance Number: 0, UniqueId: c84cff12-3b08-4836-8f07-2fad1699c844, ProcessId: 5796
2022-05-18 17:09:13.811 +00:00 [Information] Uploaded e4e64c45-5a71-4531-b699-62629b96e037 content to https://neulog5xpdiz5i2lc6k.blob.core.windows.net/gamelogs/e4e64c45-5a71-4531-b699-62629b96e037.zip in 9ms
2022-05-18 17:09:13.811 +00:00 [Information] Event: UploadedLogs. Properties: NULL, Metrics: {"CompressDuration":0.0,"UploadDuration":9.0,"DeleteDuration":0.0}
2022-05-18 17:09:14.422 +00:00 [Information] Sending heartbeat with correlationId: 0b731368-3271-41ab-b165-b2217d85b2ef, body: {"VmState":"TooManyServerRestarts","AssignmentId":"ffffffff-ffff-ffff-4180-060000000000:2b70c457-43f6-41da-81cc-33a00c8268de:NorthEurope","SessionHostHeartbeatMap":{"c84cff12-3b08-4836-8f07-2fad1699c844":{"CurrentGameState":"PendingHeartbeat","LastStateTransitionTimeUtc":"2022-05-18T17:09:13.8024945Z","AssignmentId":"ffffffff-ffff-ffff-4180-060000000000:2b70c457-43f6-41da-81cc-33a00c8268de:NorthEurope"}},"SequenceNumber":29,"AgentProcessGuid":"b76939c0-622e-4b31-8572-6f943e1702b5","IsUnassignable":true,"NetworkConfiguration":{"VmName":"226be865-05bd-4c71-ac86-678e1d80805b-AzureBatch-Deployment_0","Endpoints":[{"FrontEndPort":51000,"BackEndPort":29877,"Protocol":"Tcp"},{"FrontEndPort":52000,"BackEndPort":29876,"Protocol":"Tcp"},{"FrontEndPort":56000,"BackEndPort":56002,"Protocol":"Tcp"},{"FrontEndPort":30000,"BackEndPort":30000,"Protocol":"Udp"},{"FrontEndPort":50000,"BackEndPort":3389,"Protocol":"Tcp"}]}

And I have to say that for Local debug it's different:

CurrentGameState: Active
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
      Executing ObjectResult, writing value of type 'Microsoft.Azure.Gaming.AgentInterfaces.SessionHostHeartbeatInfo'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
      Executed action LocalMultiplayerAgent.Controllers.SessionHostController.ProcessHeartbeatV1 (LocalMultiplayerAgent) in 21.9894ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 22.1876ms 200 application/json; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 PATCH http://127.0.0.1:56001/v1/sessionHosts/5cd2cf46-ee32-4831-a171-e958720be52e application/json; charset=utf-8 93
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
      Route matched with {action = "ProcessHeartbeatV1", controller = "SessionHost"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ProcessHeartbeatV1(System.String, Microsoft.Azure.Gaming.AgentInterfaces.SessionHostHeartbeatInfo) on controller LocalMultiplayerAgent.Controllers.SessionHostController (LocalMultiplayerAgent).
CurrentGameState: Active
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
      Executing ObjectResult, writing value of type 'Microsoft.Azure.Gaming.AgentInterfaces.SessionHostHeartbeatInfo'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
      Executed action LocalMultiplayerAgent.Controllers.SessionHostController.ProcessHeartbeatV1 (LocalMultiplayerAgent) in 16.1834ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 16.4793ms 200 application/json; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 PATCH http://127.0.0.1:56001/v1/sessionHosts/5cd2cf46-ee32-4831-a171-e958720be52e application/json; charset=utf-8 93
CurrentGameState: Active
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
      Route matched with {action = "ProcessHeartbeatV1", controller = "SessionHost"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ProcessHeartbeatV1(System.String, Microsoft.Azure.Gaming.AgentInterfaces.SessionHostHeartbeatInfo) on controller LocalMultiplayerAgent.Controllers.SessionHostController (LocalMultiplayerAgent).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
      Executing ObjectResult, writing value of type 'Microsoft.Azure.Gaming.AgentInterfaces.SessionHostHeartbeatInfo'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
      Executed action LocalMultiplayerAgent.Controllers.SessionHostController.ProcessHeartbeatV1 (LocalMultiplayerAgent) in 22.0939ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 22.499ms 200 application/json; charset=utf-8

Too many restarts is the problem but I can't find game log, what is the path?

Uploaded 4cc7c89b-71fc-4473-8be9-54b5df19ab93 content to https://neulog5xpdiz5i2lc6k.blob.core.windows.net/gamelogs/4cc7c89b-71fc-4473-8be9-54b5df19ab93.zip

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sharkraceclub · May 20 at 06:47 AM 0
Share

Any advices?

avatar image Gosen Gao sharkraceclub · 3 days ago 0
Share

The logs of UE executable should be generated at the default path, for example, "YourProjectName\Saved\Logs".

avatar image sharkraceclub Gosen Gao · 3 days ago 0
Share

Hm-hm, I will double check, thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    12 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges