question

Thomas Martinet avatar image
Thomas Martinet asked

UE4 - Heartbeat endpoint and Server id are required configuration values

Hello,

We have an issue since a week when we try to use the GSDK Cpp in our UE4 project.

Ofc we already read a lot of articles such as :

https://community.playfab.com/questions/28210/multiplayer-20-unreal-engine-full-source-code.html

https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/integrating-game-servers-with-gsdk

https://api.playfab.com/docs/tutorials/landing-tournaments/multiplayer-servers-2.0/debugging-playfab-multiplayer-platform-integration-locally

And so on...

But we still have an exception on start() call : Error: GSDK Initialization failed: Heartbeat endpoint and Server id are required configuration values.

Having a look at gsdk cpp sources, it looks like the configuration file can't be found by the gsdk. However, the MockVM agent successfully write a correct configuration file :

MockPlayFabVmAgent[0] Creating the configuration file at Output\PlayFabVmAgentOutput\2019-09-27T13-22-15\Config\SH0\gsdkConfig.json

Is there a way to specify the configuration file path ? In the gsdk cpp sources, it looks like the configuration file is an environment variable. Is there a way to check if this env var is correctly set ?

Btw, we also made the tests with thunderhead servers and the issue is the same : config file is successfully created but in our server, the gsdk::start() call throw an exception.

An other user had the same issue (https://community.playfab.com/questions/32588/server-build-unhealthy-ue4-dedicated.html) but he didn't explained how he fixes this issue with config file...

Can you help us ? Thanks !

Ps: mockAgent V0.7, gsdk from nuget.

unrealCustom Game Servers
10 |1200

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

element808 avatar image
element808 answered

@Thomas Martinet - I wrote some documentation on it, that is soon to be published on docs.microsoft.com. In the meantime, here's a link to how I got the gsdk integrated into our UE4 dedicated server build. This allowed us to get a successful mockvm test and a build to work on thunderhead servers.

https://drive.google.com/file/d/1uumfZEa6nQyKBXJbezwUo5duxKjMYJ9p/view?usp=drivesdk

Hope this helps!

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.

Thomas Martinet avatar image Thomas Martinet commented ·

Hello, thanks a lot for this doc. It will helps me a lot. I'll check every step and let you know if I can fix my issue.

In a meantime I can suggest you some tips if you want: it's preferable to move the GSDK in a "ThirdParty" folder under sources (Epic's recommandations). Is it a particular reason you don't use -server and -log flags in the game manager configuration?

Again, thanks a lot.

0 Likes 0 ·
element808 avatar image element808 Thomas Martinet commented ·

@Thomas Martinet - we don't use the -log and -server flags because for one, the dedicated server executable always runs as if the -server flag was set and two, the -log flag only allows you to view the logs in the server console window, but you don't need to see that when it's running on Thunderhead. When you login or RDP into your server instances, these logs are still saved by PlayFab running within the docker container, but when you set up the Thunderhead servers, and you know your UE4 dedicated server is working properly, you won't need to see the command line output unless you're troubleshooting an issue. When you build your dedicated server from UE4 and are testing, you can include the -log flag if you'd like, so it's easier to test and see what's going on.

0 Likes 0 ·
Thomas Martinet avatar image Thomas Martinet commented ·

Well, I followed your steps perfectly but we still have the issue with "configuration values are required..."

0 Likes 0 ·
element808 avatar image element808 Thomas Martinet commented ·

@Thomas Martinet - If I'm not mistaken (maybe @SethDu can confirm this), that specific error means that you have not setup your MockVM config file correctly. Should be called "MultiplayerSettings.json". Here's a generic one that you can use, that should work. Just make sure your dedicated server .zip file is stored in "C:/Assets_Base/" and that you convert it back to a .json (I had to convert it to .txt to include it in this post). Also make sure that you update the "LocalFilePath" to match what your zip file is called and that your "StartGameCommand" matches your .exe name. multiplayersettingsjson.txt

0 Likes 0 ·
thomasmartinet avatar image thomasmartinet element808 commented ·

Hello, Thanks for your help but all my configuration was good.

Actually, during this weekend, I have found the issue. Its all about the "GSDK_CONFIG_FILE" env variable which specifies the path to the Playfab configuration file.

This variable is correctly set, but it's filled with a relative path. If I replace this env var with absolute path, my server starts perfectly. No more issue with "configuration values are required...".

In other terms, it seems the entry point of my server is not good regarding of the relative path of the config file.

In a meantime I can create a workaround to use absolute path, I just need to know where is located the config file in Thunderhead servers' filesystem in order to use the absolute path. Thanks!

0 Likes 0 ·
Show more comments
Seth Du avatar image
Seth Du answered

Currently, there is no way to configure it because it is generated dynamically. Can you download the sample project from our official GitHub repository and try to run it while compare this project with yours?

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

Thomas Martinet avatar image Thomas Martinet commented ·

I'll try asap and let you know about results. Thanks.

0 Likes 0 ·
Thomas Martinet avatar image Thomas Martinet commented ·

The example code works well... Btw, we have our error by compiling on 2 differents computers...

Maybe the version of the GSDK we use has an issue?

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.