By using AWS re:Post, you agree to the Terms of Use

Gamelift fleet creation from real-time script stuck in "Activating" status with insufficient event logs

0

Hi community,

I was trying to initiate a Gamelift fleet using an zip file from s3 (created by CDK Asset). However the fleet created will get stuck in "Activating" for more than one hour and then error. No usable event log is emitted from console during "Activating". I can ssh into the game server in error status but not sure if that is helpful.

Any help would be appreciated on how to debug further.

(More context: the server files themselves are fine. I uploaded the zip file directly to create the script and the fleet from the script is created just fine). The s3 access rights seem to be okay too, I followed the example here . The CDK code for uploading server to s3 and creating the script is as follows)

import { Role, PolicyStatement, ServicePrincipal } from "aws-cdk-lib/aws-iam";
import { Asset } from "aws-cdk-lib/aws-s3-assets";
import { Bucket } from "aws-cdk-lib/aws-s3";
import { CfnScript } from "aws-cdk-lib/aws-gamelift";

...
// Upload gamelift real-time server script as cdk asset
    const scriptAsset = new Asset(this, "MyAsset", {
      path: pathToScript,
    });

    const assetBucket = Bucket.fromBucketName(
      this,
      "ScriptAssetBucket",
      scriptAsset.s3BucketName
    );
    
    const scriptAccessRole = new Role(this, "ScriptAccessRole", {
      assumedBy: new ServicePrincipal("gamelift.amazonaws.com"),
    });
    scriptAccessRole.addToPrincipalPolicy(
      new PolicyStatement({
        actions: ["s3:GetObject", "s3:GetObjectVersion"],
        resources: [`${assetBucket.bucketArn}/${scriptAsset.s3ObjectKey}`],
      })
    );

    const script = new CfnScript(this, "RealTimeScript", {
      name: `my-script`,
      version: "0.1",
      storageLocation: {
        bucket: scriptAsset.s3BucketName,
        key: scriptAsset.s3ObjectKey,
        roleArn: scriptAccessRole.roleArn,
      },
    });
    script.node.addDependency(scriptAccessRole);
asked 18 days ago14 views
1 Answer
0

Hi,

One common reason a fleet goes from the ACTIVATING status into ERROR is due to an invalid LaunchPath in the ServerProcess configuration https://docs.aws.amazon.com/gamelift/latest/apireference/API_ServerProcess.html

Hope that helps.

answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions