question

GraySeedGames avatar image
GraySeedGames asked

LocalVMAgent not working while running container mode for UE4 server build

My UE4 game server EXE file works fine while using the non-container mode of the VM agent. but when I run my game server using container mode VM agent stock in this stage :


everything works fine on non-container mode.

unrealCustom Game Serversmultiplayer
10 |1200

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

GraySeedGames avatar image
GraySeedGames answered

All fixed. my server now running in container mode. thanks to all Playfab community and thank you, Rick. the last issue was my path to EXE was wrong. now I want to explain some other things for developers.

make sure you don't miss DLL files and your DLL files are loaded correctly what I mean is when you run "Listalldll" you should see the DLL files are loading from your local binaries folder of your game not the System32 folder of your windows.

I followed another thread and copied a line of code that supposed to add the D3DCompiler DLL file but that was wrong and I wonder how ue4 added that DLL file to my binaries folder so for D3D Compiler use :

 RuntimeDependencies.Add("$(TargetOutputDir)/D3DCompiler_43.dll", "C:/Windows/System32/D3DCompiler_43.dll", StagedFileType.SystemNonUFS);

and another thing was the plugins. I added a blacklist plugin in "Myserver.build.cs" file :

DisablePlugins.Add("WMFMediaPlayer");
DisablePlugins.Add("AsyncLoadingScreen"); //if you are using this plugin
DisablePlugins.Add("WindowsMoviePlayer");
DisablePlugins.Add("MediaFoundationMediaPlayer");

and the last thing :

you must give the path to your EXE file in the binaries folder, not the root EXE file

eg: C:\Assets\YourGame\Binaries\Win64\YourGameServer.exe

I hope other developers do not dig as much as I did for this :)

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.

Daniel avatar image Daniel commented ·

Thank you for leaving your answer. I've spent hours trying to get my server to work, and this solution fixed it for me. Though I think you miss typed when you said to disable the plugins in the Build.cs file. You do that in the YourProjectNameServer.Target.cs file. At least that is how I did it.

0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

This issue indicates that the VM agent cannot detect the heatbeat from your server EXE. It could be due to incorrectly configured Game port. Please check if the game port in your server EXE matches the game port in the MultiplayerSettings.json.

6 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.

GraySeedGames avatar image GraySeedGames commented ·

Thanks for the reply, Yes I think I didn't config my game server to listen to the given Playfab's port name.I will fix this and update this thread.

0 Likes 0 ·
GraySeedGames avatar image GraySeedGames commented ·

I fixed this issue but now my dock exits with code 1. I implemented almost every DLL that ue4 needs. Please help . i don't know whats wrong.

0 Likes 0 ·
0011.png (333.9 KiB)
Rick Chen avatar image Rick Chen ♦ GraySeedGames commented ·

Could you please describe how your UE4 game server is built in detail? Please also check this thread: https://community.playfab.com/questions/46217/cant-run-server-withing-a-container-exited-with-ex.html and see if it helps.

0 Likes 0 ·
GraySeedGames avatar image GraySeedGames commented ·

UE4 Server has separate modules to configure. I configured my server module to connect to GSDK for heartbeats. after some try and error, I understand that I miss many DLL files for my server build, so I tell ue4 to add some dynamic and static DLL files to my game server binaries folder. I test these in "process" mode and all worked together and fine, but it's not working in container mode. after all of these, I used the "list all DLL" application to see what DLL I'm missing in the Playfab docker image and then imported some of DLL files that don't exist in docker. again nothing happened. for my next stage, I want to add all of the DLL files listed in the "list all DLL "to see what is wrong. I know this is crazy but I have to . after I do this I will update this thread. BTW my sever build is 64bit. should I add 32bit DLL files ?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ GraySeedGames commented ·

Please make sure that these actions are taken:

  1. Include all DLLs with these steps that are not in docker.
  2. Place the DLLs in the same folder as your executable.
  3. Turn off the Windows Media Player plugin in UE4, as it may not be compatible with the PlayFab.
  4. make sure your UE4 server is source build. Please refer to Setting Up Dedicated Servers

I am looking forward to your update.

0 Likes 0 ·
GraySeedGames avatar image GraySeedGames Rick Chen ♦ commented ·

I fixed the issue, that was a plugin that used a windows media player. now the problem is in my local system docker works using container but when I upload on Playfab its state is pending heartbeat and stays.

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.