UE4 Dedicated Server started but did not call InitSDK()

@Alexis

I’m testing a simple UE4 dedicated server deployed to a fleet. I tested the build locally with the GameLiftLocal.jar and the server correctly calls InitSDK(), allows creation of game sessions, etc. (tested with the AWS cli locally).

Now I deployed the build (packaged with the install.bat, dependencies) and I’m getting some odd behavior. The Fleet status is Active (1 active instance) but there are no Active servers. I did a remote RDP into the instance and I can see the UE4 server is running and in fact I can connect directly with my UE4 client (using open IP:port). I can also run the server manually, so no dependency issues.

The issue I see is that calling CreateGameSession for that fleet-id from the AWS cli results in the error:

"An error occurred (FleetCapacityExceededException) when calling the CreateGameSession operation"

The EVENTS from the Fleet console look suspicious as well, they indicate Gamelift doesn’t see the InitSDK() calls. This is odd as the same build works fine locally (as i described above).


2017-05-11 11:52:59 UTC-0700
SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT
Server started correctly but did not call InitSDK() in the GameLift Server SDK within 5 minutes. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:47:15 UTC-0700
SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT
Server started correctly but did not call InitSDK() in the GameLift Server SDK within 5 minutes. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:37:00 UTC-0700
SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT
Server started correctly but did not call InitSDK() in the GameLift Server SDK within 5 minutes. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:26:45 UTC-0700
SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT
Server started correctly but did not call InitSDK() in the GameLift Server SDK within 5 minutes. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:19:00 UTC-0700
FLEET_SCALING_EVENT
Fleet fleet-XXXXXXXXXXXXXXXXXXXXXXXXXXXXX capacity settings have been changed: Desired size = 1, Max size = 1, Min size = 0
2017-05-11 11:18:50 UTC-0700
FLEET_SCALING_EVENT
Completed update: Scaling policy Safe Scaling Policy on fleet fleet-XXXXXXXXXXXXXXXXXXX. ExactCapacity 0 when CurrentPlayerSessions LessThanThreshold 1.000000 for 240 periods
2017-05-11 11:18:50 UTC-0700
FLEET_SCALING_EVENT
Started update: Scaling policy Safe Scaling Policy on fleet fleet-XXXXXXXXXXXXXXXXX. ExactCapacity 0 when CurrentPlayerSessions LessThanThreshold 1.000000 for 240 periods
2017-05-11 11:18:25 UTC-0700
FLEET_STATE_ACTIVE
Fleet fleet-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX changed state to ACTIVE
2017-05-11 11:16:30 UTC-0700
SERVER_PROCESS_CRASHED
Server Process exited without calling process ending. Exit Code: -1073741502. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:16:15 UTC-0700
SERVER_PROCESS_CRASHED
Server Process exited without calling process ending. Exit Code: -1073741502. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:16:00 UTC-0700
SERVER_PROCESS_CRASHED
Server Process exited without calling process ending. Exit Code: -1073741502. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:15:49 UTC-0700
SERVER_PROCESS_CRASHED
Server Process exited without calling process ending. Exit Code: -1073741502. (C:\game\MultiplayerShootoutServer.exe Level_01)
2017-05-11 11:10:54 UTC-0700
FLEET_STATE_ACTIVATING
Fleet fleet-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX changed state to ACTIVATING

The code run by my GameMode in UE4 is pretty much copy/pasted from here.

Also, looking at the fleet instance in remote desktop I look at the Task Manager and can see that 4 server processes have been started even though my Concurrent Processes limit is set to 1. That seems to coincide with the SERVER_PROCESS_SDK_INITIALIZATIO_TIMEOUT event every 10 min.

4598-runningprocesses.png

Hi @Alexis,

That solved my issues, thanks!

Hi @taucetistudios,

I think I know what’s going on here.
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.
This changes the Process Id GameLift is expected to see when the game server connects to our local agent on the box.

So, to resolve the issue, I would suggest you specify the exact game server process that loads up the SDK in your runtime configuration.

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

That is assuming your executable is at that location. Please adjust according to your build structure.

Hope this helps!

Alexis