question

asaxgame0212 avatar image
asaxgame0212 asked

Container exited with exit code 1

I built a 64bit Unity game server.

and it ran successfully with process mode in LocalMultiplayerAgent but failed on container mode

and I use listDll to find out all the System32 dll I need.

run the docker image : docker run -it mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.3046 cmd

but I dont know which DLLs present in the container ,

I just copy all the DLLs listed on ListDlls.

PS C:\PlayFabVmAgent\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: 635980D4
BuildId: 583e5c8b-642c-42a6-8356-eff15c40df7a
VmId: xcloudwusu4uyz5daouzl:WestUs:32f828b9-4998-42df-b10e-a93c96193147:tvmps_26ff1770e1fe4f719ab083e0abc9b35860053688e8cc4801b91ac23b86e410d6_d
Root output folder: C:\Users\user\AppData\Local\Temp\.net\LocalMultiplayerAgent\ray67pB6YrFlTR5Fth+KKMkZ2KMXL98=\PlayFabVmAgentOutput\2022-08-23T16-27-32
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
      User profile is available. Using 'C:\Users\user\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 (TCP): Local port 56100 mapped to container port 7777
info: PlayFabLocalMultiplayerAgent[0]
      Starting image pull for: mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.3046.
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Pulling from playfab/multiplayer","id":"wsc-10.0.17763.3046"}
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Digest: sha256:371276dc85104339af9f358df7b0b9a0d7566ec6711db78ae3d00f5ad71ec3ba"}
info: PlayFabLocalMultiplayerAgent[0]
      {"status":"Status: Image is up to date for mcr.microsoft.com/playfab/multiplayer:wsc-10.0.17763.3046"}
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.3046'
info: PlayFabLocalMultiplayerAgent[0]
      Event: ContainerStats. Properties: NULL, Metrics: {"ContainerCreationTimeMs":51.0}
info: PlayFabLocalMultiplayerAgent[0]
      Created a container with session host id: 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33
info: PlayFabLocalMultiplayerAgent[0]
      Creating the configuration file at C:\Users\user\AppData\Local\Temp\.net\LocalMultiplayerAgent\ray67pB6YrFlTR5Fth+KKMkZ2KMXL98=\PlayFabVmAgentOutput\2022-08-23T16-27-32\Config\SH0\gsdkConfig.json
info: PlayFabLocalMultiplayerAgent[0]
      Event: ContainerStats. Properties: NULL, Metrics: {"ContainerStartTimeMs":9132.0}
info: PlayFabLocalMultiplayerAgent[0]
      Container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33 start completed.
info: PlayFabLocalMultiplayerAgent[0]
      Started container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33, with assignmentId ffffffff-ffff-ffff-d480-596300000000:583e5c8b-642c-42a6-8356-eff15c40df7a:WestUs, instance number 0, and logFolderId 5b59c3f9-60bf-4dfa-a5ee-d0b6a84b378e
info: PlayFabLocalMultiplayerAgent[0]
      Waiting for heartbeats from the game server.....
info: PlayFabLocalMultiplayerAgent[0]
      Container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33 exited with exit code 1.
info: PlayFabLocalMultiplayerAgent[0]
      Collecting logs for container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33.
info: PlayFabLocalMultiplayerAgent[0]
      Copying log file C:\ProgramData\Docker\containers\9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33\9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33-json.log for container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33 to C:\Users\user\AppData\Local\Temp\.net\LocalMultiplayerAgent\ray67pB6YrFlTR5Fth+KKMkZ2KMXL98=\PlayFabVmAgentOutput\2022-08-23T16-27-32\GameLogs\5b59c3f9-60bf-4dfa-a5ee-d0b6a84b378e\PF_ConsoleLogs.txt.
info: PlayFabLocalMultiplayerAgent[0]
      Deleting container 9cfc649526e19e222aba94fa7c56443e714405a825255caa7775efac13751d33.

PE_ConsoleLogs :

{"log":"Running Startup Script\n","stream":"stdout","time":"2022-08-23T07:51:52.6838242Z"} {"log":"Certificates located at: C:\\GameCertificates\n","stream":"stdout","time":"2022-08-23T07:51:52.7006969Z"}

10 |1200

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

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

As Troubleshooting of debugging container-based game server mentions, “In container mode, if your game server exits immediately with an error similar to "Container ... exited with exit code 1", but it works fine in process mode, make sure that you've included all required system DLLs in your asset package.” You can follow Determining required DLLs for Windows game servers - PlayFab | Microsoft Docs to list the DLLs present in the container and compare to the list of required DLLs that you generated. Any DLLs in the required list, but not present in the container, must be included in your asset zip file.

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.