-
Notifications
You must be signed in to change notification settings - Fork 6
Cannot start agent a second time with containers. #5
Comments
hey @asusralis, which guide did you follow? As mentioned here, the LocalMultiPlayerAgent is meant to be used for local development, not to be uploaded onto PlayFab service (unless I misunderstood something). |
So, I tested the game on my computer and it worked. I then uploaded the build (what was tested on my computer, NOT the agent) to PlayFab and it did not work. I then went back to my computer to test it again to see if I could figure out why it was working on my computer but not on the PlayFab server and I wasn't able to get the agent to run again. I did not upload the agent to PlayFab. That is the guide I used. I was able to run my game in a container and it went through the motions. I tried it again the next day and it gave me those errors. |
Maybe Docker networks on your local installation have an issue? You might want to restart the Docker daemon. Maybe try deleting docker networks and retrying (here's the CLI reference -> https://docs.docker.com/engine/reference/commandline/network/). Sometimes deleting the "DockerNAT" virtual switch from Hyper-V Manager helps, you can restart Docker from system tray to recreate. |
I had the exact same issue, running |
Thanks for reporting that @starburst997! |
hey @asusralis is this issue still relevant? Thanks! |
Closing, feel free to open a new issue if the problem exists. |
The first time I ran the agent with a container it worked correctly and went through the motions. I uploaded to PlayFab but it said my build was unhealthy, so I went back to try it again. Now this shows up:
info: MockPlayFabVmAgent[0]
Event: ContainerStats. Properties: NULL, Metrics: {"containerCreationTimeMs":101.0}
info: MockPlayFabVmAgent[0]
Created a container with session host id: d21d16cca1a0a886c41473ef4466d7e18fc29faf0d409814ea8cacc4770767b9
Unhandled Exception: System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.Single[TSource](IEnumerable
1 source, Func
2 predicate)at Microsoft.Azure.Gaming.VmAgent.ContainerEngines.DockerContainerEngine.GetVmAgentIpAddress() in D:\t2\src\VmAgent\VmAgent.Common\Interfaces\DockerContainerEngine.cs:line 108
at Microsoft.Azure.Gaming.VmAgent.ContainerEngines.DockerContainerEngine.CreateAndStart(Int32 instanceNumber, GameResourceDetails gameResourceDetails, ISessionHostManager sessionHostManager) in D:\t2\src\VmAgent\VmAgent.Common\Interfaces\DockerContainerEngine.cs:line 351
at Microsoft.Azure.Gaming.MockVmAgent.MultiplayerServerManager.CreateAndStartContainerWaitForExit(SessionHostsStartInfo startParameters) in D:\t2\src\VmAgent\MockVmAgent\MultiplayerServerManager.cs:line 49
at Microsoft.Azure.Gaming.MockVmAgent.Program.Main(String[] args) in D:\t2\src\VmAgent\MockVmAgent\Program.cs:line 69
I made sure to run the two commands at the end of the guide to end all containers.
The text was updated successfully, but these errors were encountered: