question

Chad Reddick avatar image
Chad Reddick asked

UE4 LocalMultiplayerAgent Setup isn't starting up

Hello!

I've been following this Github tutorial here to setup the LocalMultiplayerAgent for Unreal in our current project.

-I have the Server put into a container via Docker
-All of the ports and Server.zip setup is all good to go for the MultiplayerSettings.json.
-I am able to run the LocalMultiplayerAgent.exe via Windows Powershell.

However, when it runs, it doesn't proceed in the Testing Locally Using LocalMultiplayerAgent Section.

The logs that are producing look like this:

PS C:\Users\chadr\OneDrive\Desktop\LocalMultiplayerAgent.publish\LocalMultiplayerAgentPublish> .\LocalMultiplayerAgent.exe
Thank you for using PlayFab Multiplayer Servers
Check this page for debugging tips: https://github.com/PlayFab/gsdkSamples/blob/master/Debugging.md
No output directory specified, defaulting to agent directory
Warning: SessionCookie is not specified.
TitleId: 334BFE5E
BuildId: 8b8ab4b6-6a59-47ab-8499-1dd7d36043b1
VmId: xcloudwusu4uyz5daouzl:WestUs:05324355-a8ca-42ac-8717-a2e320187094:tvmps_18adaea695a343bea47e2f2af3f24650215c50dd390d40189c8e8c438534bf09_d
Root output folder: C:\Users\chadr\AppData\Local\Temp\.net\LocalMultiplayerAgent\xvzr5lq2.2yk\PlayFabVmAgentOutput\2022-04-18T16-11-26
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using 'C:\Users\chadr\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
Local Multiplayer Agent is listening on port 56001
Player1, Player2
info: PlayFabLocalMultiplayerAgent[0]
      game_port (UDP): Local port 1777 mapped to container port 1777
info: PlayFabLocalMultiplayerAgent[0]
      Starting image pull for: mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.973.1.
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Pulling from playfab/multiplayer","id":"wsc-10.0.17763.973.1"}
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Digest: sha256:e0f9ba8947b7c011955bd2739a7b0c4e554db35abc6a9973d429184b67168578"}
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Status: Image is up to date for mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.973.1"}
info: PlayFabLocalMultiplayerAgent[0]
      Event: PullImage. Properties: NULL, Metrics: {"DownloadDuration":0.0,"ExtractDuration":0.0,"Size":0.0}
info: PlayFabLocalMultiplayerAgent[0]
      Creating container. Image='mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.973.1'
info: PlayFabLocalMultiplayerAgent[0]
      Event: ContainerStats. Properties: NULL, Metrics: {"ContainerCreationTimeMs":107.0}
info: PlayFabLocalMultiplayerAgent[0]
      Created a container with session host id: 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8
info: PlayFabLocalMultiplayerAgent[0]
      Creating the configuration file at C:\Users\chadr\AppData\Local\Temp\.net\LocalMultiplayerAgent\xvzr5lq2.2yk\PlayFabVmAgentOutput\2022-04-18T16-11-26\Config\SH0\gsdkConfig.json
info: PlayFabLocalMultiplayerAgent[0]
      Event: ContainerStats. Properties: NULL, Metrics: {"ContainerStartTimeMs":1336.0}
info: PlayFabLocalMultiplayerAgent[0]
      Container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8 start completed.
info: PlayFabLocalMultiplayerAgent[0]
      Started container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8, with assignmentId ffffffff-ffff-ffff-5efe-4b3300000000:8b8ab4b6-6a59-47ab-8499-1dd7d36043b1:WestUs, instance number 0, and logFolderId b327288a-0c23-427a-b316-db8d601be083
info: PlayFabLocalMultiplayerAgent[0]
      Waiting for heartbeats from the game server.....
info: PlayFabLocalMultiplayerAgent[0]
      Container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8 exited with exit code 1.
info: PlayFabLocalMultiplayerAgent[0]
      Collecting logs for container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8.
info: PlayFabLocalMultiplayerAgent[0]
      Copying log file C:\ProgramData\Docker\containers\2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8\2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8-json.log for container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8 to C:\Users\chadr\AppData\Local\Temp\.net\LocalMultiplayerAgent\xvzr5lq2.2yk\PlayFabVmAgentOutput\2022-04-18T16-11-26\GameLogs\b327288a-0c23-427a-b316-db8d601be083\PF_ConsoleLogs.txt.
info: PlayFabLocalMultiplayerAgent[0]
      Deleting container 2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8.

It gets to 'Waiting for heartbeats from the game server...' Then it just exits.

Steps I did to ensure things are valid:

-I applied the DLLs in the Binaries folder in the UE4 Server exe (even applied all of the System32 dlls just for good measure)
-Ensured the ports are all correct on both UE Server and MultiplayerSettings.json
-Checked port to ensure it's not being prevented from the firewall

If any sort of direction what is happening or what is being missed, would be greatly appreciated!
unrealmultiplayer
11 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rick Chen avatar image Rick Chen ♦ commented ·

Could you please also provide the container log and PF_ConsoleLogs.txt for us to diagnose?

0 Likes 0 ·
Chad Reddick avatar image Chad Reddick Rick Chen ♦ commented ·

pf-consolelogs.txt

For some reason I cannot get the container logs actually.

But either way,the PF_ConsoleLogs are attached here.

0 Likes 0 ·
Chad Reddick avatar image Chad Reddick Rick Chen ♦ commented ·

To be more specific when trying to get the logs from docker, here's what i see

0 Likes 0 ·
error.png (43.6 KiB)
Chad Reddick avatar image Chad Reddick commented ·

Ok. I got a step further in the process (re-processed the DLLs), but now it's stuck on

info: PlayFabLocalMultiplayerAgent[0]
      Waiting for heartbeats from the game server.....


Is there a way to kill the process so then this can produce the logs causing the wait?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ Chad Reddick commented ·

You can use the following command to stop the container:

docker stop $(docker ps -aq)

docker rm $(docker ps -aq)

Please refer to this document for more detail: Debug Container-based game servers using LocalMultiplayerAgent - PlayFab | Microsoft Docs

0 Likes 0 ·
Chad Reddick avatar image Chad Reddick Rick Chen ♦ commented ·

Made an attempt on this. No such luck to produce the logs on why this hang-up is happening. On the bright side, it's not exiting right after.. But yea it seems to be just hung up on "Waiting for heartbeats from the game server...." . I'm at a loss here on how or where else to debug this issue to have a Local Playfab sandbox (aka LocalMultiplayerAgent).

0 Likes 0 ·
Show more comments
Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

The message "Container2cc476c50f7f11578a58d5963d699641b5d50b29f36c90cd50ea342bbc990cd8 exited withexit code 1." shows that the process crashed. As Rick mentioned, logs could help us diagnose.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered
@CHADALAK1

sorry you're still having issues. Are you running Unreal using the "-stdout" option in the start command so it will throw all logs on standard output?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.