Hi everyone, we are currently working on a unity3d multiplayer project in C#. When initializing the gamelift serverSDK the following error occurs in Unity.

InitSDK failure : [GameLiftError: ErrorType=LOCAL_CONNECTION_FAILED, ErrorName=Local connection failed., ErrorMessage=Connection to local agent could not be established].

The SDK is initialized as follows:

var initSDKOutcome = GameLiftServerAPI.InitSDK();

In use are:

  • GameLiftServerSDKNet45.dll
  • Unity projekt settings Netframework 4.0

The initialization happens when the game is started. Is there an obvious solution to this problem or can we provide needed information to determine the problem more precisely?

Hi @KKVision

  1. Are you testing with GameLift Local? If not, this can help speed up your iteration time since you won’t have to wait for fleet activations. As long as you can see a successful heartbeat in GameLift Local, it usually means that your fleet can go ACTIVE (barring another common point of mistake – install script, though there is a log for why install script fails now so it’s much easier to debug).

  2. Are you by any chance using .NET 4.x? The latest Unity LTS versions compile with .NetStandard 2.0 by default. The GameLiftServerSDK only supports .NET 4.5 currently. Go to your “Player Settings > Configuration > Scripting Runtime Version” to modify this.

  3. This error happens when the server cannot connect to the GameLift onbox daemon (which is essentially a websocket server) at ws:// Could you check if that address or port is blocked somehow? Do you have Hosts file that redirects somewhere else?