Jamie Seward avatar image
Jamie Seward asked

LocalMultiplayerAgent.exe and Linux Container issues

I'm having issues getting the local debugging of my game server in a Linux Container working following

- I have windows non-container and windows container working.

- I have a linux container that runs the game server with no issues (tested with "docker run")

But running ".\LocalMultiplayerAgent.exe -lcow" I get "invalid reference format":

Unhandled exception. Docker.DotNet.DockerApiException: Docker API responded with status code=BadRequest, response={"message":"invalid reference format"}
   at Docker.DotNet.DockerClient.HandleIfErrorResponseAsync(HttpStatusCode statusCode, HttpResponseMessage response, IEnumerable`1 handlers)
   at Docker.DotNet.DockerClient.MakeRequestAsync(IEnumerable`1 errorHandlers, HttpMethod method, String path, IQueryString queryString, IRequestContent body, IDictionary`2 headers, TimeSpan timeout, CancellationToken token)
   at Docker.DotNet.ContainerOperations.CreateContainerAsync(CreateContainerParameters parameters, CancellationToken cancellationToken)
   at Microsoft.Azure.Gaming.VmAgent.ContainerEngines.DockerContainerEngine.<>c__DisplayClass15_0.<<CreateContainer>b__4>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Azure.Gaming.VmAgent.TaskUtil.TimedExecute[T](Func`1 action, MultiLogger logger, String eventName, String metricName, Int64 elapsedThreshold)
   at Microsoft.Azure.Gaming.VmAgent.ContainerEngines.DockerContainerEngine.CreateContainer(String imageName, IList`1 environmentVariables, IList`1 volumeBindings, IList`1 portMappings, IList`1 startCmd, HostConfig hostConfigOverrides, String workingDirectory)
   at Microsoft.Azure.Gaming.VmAgent.ContainerEngines.DockerContainerEngine.CreateAndStart(Int32 instanceNumber, GameResourceDetails gameResourceDetails, ISessionHostManager sessionHostManager)
   at Microsoft.Azure.Gaming.LocalMultiplayerAgent.MultiplayerServerManager.CreateAndStartContainerWaitForExit(SessionHostsStartInfo startParameters)
   at Microsoft.Azure.Gaming.LocalMultiplayerAgent.Program.Main(String[] args)
   at Microsoft.Azure.Gaming.LocalMultiplayerAgent.Program.<Main>(String[] args)
docker --version
Docker version 20.10.5, build 55c4c88
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

Jamie Seward avatar image
Jamie Seward answered

Ok downloaded the source code and figured out the issue. ImageDetails.Registry in the MultiplayerSettings.json was empty so "string imageName = $"{imageDetails.Registry}/{imageDetails.ImageName}:{imageDetails.ImageTag ?? "latest"}";" was making a malformed final imageName.

1 comment
10 |1200

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

Paul Gilmore avatar image Paul Gilmore commented ·

Greetings from PlayFab:

We understand that generating your MultiplayerSettings.json file is difficult. We have recently made a tool to try and improve this. Please take a look:
The tool should be ideally suited to create properly escaped json, so it may help avoid issues like this.

That said... We don't yet have inputs pertaining to the container... Let us know if you find this tool helpful, and if so, how we could improve it for your needs.

0 Likes 0 ·

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.