UE4 Dedicated server hanging after calling InitSDK(), why?

So I have a dedicated server that I’m trying to upload and use via the GameLift Online Console. But on the fleet ‘event board’ I’ve been getting timeout errors because my server isn’t reporting back as healthy. Which is odd because when I test with GameLiftLocal everything is fine and it reports back healthy.

So I ran my GameLift dedicated server locally, the same one I packaged, uploaded, and also tested with GameLiftLocal, and found out that the server hangs after calling “gameLiftSdkModule->InitSDK();”. And by hang, I mean the process doesn’t move forward, but its still alive and not using any of the CPU. So I’m guessing that the same thing is happening when I upload my build to GameLift.

I don’t get any build errors and I believe I’ve integrated the GameLiftClientSDK and GameLiftServerSDK correctly. Somthing to note is that I’m trying to do what this guy has done with his UE4 project (https://forums.awsgametech.com/t/downsides-to-using-client-sdk-on-servers/3116/1), where the server calls CreateSession() on itself so that the client just has to search for an open server instead of creating one, then joining. So on start up my server initializes the GameLiftServerSDK then the Client SDK and calls CreateSession(). But as of right now, except on GameLiftLocal, the server is stopping at initializing the GameLiftSDK.

Sorry if this was ramble-y, does anyone know what my problem is?

What SDK version are you on?

If you can provide your fleetid and region we maybe able to diagnose our end.

Two guesses:

  1. It takes too long from your process launching to calling InitSDK but that would not explain the hang. So process is getting killed right at InitSDK time. You have a fairly long window here so its unlikely.

  2. Unreal uses an executable to launch your game server. It’s basically a wrapper at the top level of your build that will launch the actual game server executable. Ensure you are pointing the launch path at your game server executable ie

Instead of using C:\game\MultiplayerShootoutServer.exe as the launch path, use something like: C:\game\MultiplayerShootoutServer\Binaries\Win64\MultiplayerShootoutServer.exe

Otherwise Gamelift may not recognize your process and you will fail health checks.