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.
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.
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 :)
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.
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.
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.
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.
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.
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 ?
Please make sure that these actions are taken:
I am looking forward to your update.
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.
6 People are following this question.