question

sharkraceclub avatar image
sharkraceclub asked

LocalMultiplayerAgent.exe: command not found

I am trying to debug locally my Unreal Linux build. I installed Ubuntu 20.04 with WSL, docker etc., been able to build and push to playfab server but it says it's Unhealthy because To many restarts. That could be true because I only added GSDK to GameInstance Subsystem, build it and want to see how it looks like)

So, now I am at step when I actually want to understand what's wrong and to run it locally with LocalMultiplayerAgent.exe. I opened Linux bash console and did that:

asur_zar@DESKTOP-RPPCVRA:~$

asur_zar@DESKTOP-RPPCVRA:~$ docker network create playfab --driver bridge da5e46f9f572ca7284198f3f545d2bdf104fdbbebe75aacdf2f5402044acb8b4

asur_zar@DESKTOP-RPPCVRA:~$ /mnt/d/UnrealLinux/LocalMultiplayerAgentPublish/LocalMultiplayerAgent.exe -lcow Have a nice day! Check this page for debugging tips: https://github.com/PlayFab/gsdkSamples/blob/master/Debugging.md Unhandled exception. System.IO.FileNotFoundException: Could not find file '\\wsl$\Ubuntu-20.04\home\asur_zar\Multiplayer Settings.json'. File name: '\\wsl$\Ubuntu-20.04\home\asur_zar\MultiplayerSettings.json' at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileO ptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.IO.File.ReadAllText(String path) at Microsoft.Azure.Gaming.LocalMultiplayerAgent.Program.Main(String[] args) at Microsoft.Azure.Gaming.LocalMultiplayerAgent.Program.<Main>(String[] args)

asur_zar@DESKTOP-RPPCVRA:~$ cd /mnt/d/UnrealLinux/LocalMultiplayerAgentPublish

asur_zar@DESKTOP-RPPCVRA:/mnt/d/UnrealLinux/LocalMultiplayerAgentPublish$ LocalMultiplayerAgent.exe -lcow LocalMultiplayerAgent.exe: command not found

Absolutely no information about this error.

I prepared MultiplayerSettings.json this way:

{ "RunContainer": true,

"ForcePullFromAcrOnLinuxContainersOnWindows": false,

"AssetDetails": [ { "MountPath": "H:\\SharkRace\\Packaged\\LinuxServer", "LocalFilePath": 0 } ], "PortMappingsList": [ [ { "GamePort": { "Number": 30000, "Name": "Entry", "Protocol": "TCP" }, "NodePort": 7777 } ] ],

"GameCertificateDetails": [ ], "SessionConfig": { "SessionCookie": null, "SessionId": "92bddbcb-d4d8-464e-b19e-e4142e5f579f", "InitialPlayers": [ "Player1" ] },

"DeploymentMetadata": { "Environment": "LOCAL", "FeaturesEnabled": "List,Of,Features,Enabled" }, "TitleId": "SharkRacer", "Region": "NorthEurope", "BuildId": "0277a689-90a1-48b5-8bb0-6978aa9274a4", "RunMode": 1,

"ContainerStartParameters": { "StartGameCommand": "", "resourcelimits": { "cpus": 1, "memorygib": 4 }, "imagedetails": { "Registry": "customer------.azurecr.io", "ImageName": "customer-----.azurecr.io/shark-racer", "ImageTag": "t0", "Username": "customer-----", "Password": "password here" } }, "OutputFolder": "D:\\UnrealLinux\\LocalMultiplayerAgentPublish\\WindowsContainerLogOutput", "NumHeartBeatsForActivateResponse": 10, "NumHeartBeatsForTerminateResponse": 60, "AgentListeningPort": 56001 }

I have to say that I am new to container deploy. Meanwhile I will try to test windows server as process.

unrealmultiplayer
10 |1200

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

Made Wang avatar image
Made Wang answered

Maybe your port configuration is wrong, by default, NodePort should be 56100, Number should be 7777, you can use MpsAgent/LocalMultiplayerAgent/SettingsJsonGenerator at main PlayFab/MpsAgent (github.com) to generate MultiplayerSettings.json, and you can refer to Debug Container-based game servers using LocalMultiplayerAgent - PlayFab | Microsoft Docs for the definition.

To debug in windows, you can refer to Debug Process-based game servers using LocalMultiplayerAgent - PlayFab | Microsoft Docs.

10 |1200

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

sharkraceclub avatar image
sharkraceclub answered

Port, okay, I will try to change.

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

@sharkraceclub curious about this path: Could not find file '\\wsl$\Ubuntu-20.04\home\asur_zar\Multiplayer Settings.json'

Are you running LocalMultiplayerAgent in WSL by any chance? The utility is only supported in Windows (so either cmd.exe or powershell.exe)

10 |1200

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

sharkraceclub avatar image
sharkraceclub answered

@Dimitris even if I use linux container server I still need to use powershell for LocalMultiplayerAgent?

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

@sharkraceclub correct. If you use Linux you need to start LocalMultiplayerAgent with -lcow parameter Locally debugging game servers and integration with PlayFab - PlayFab | Microsoft Docs

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.