I figured it out: I was locking up the server by starting too many processes at the same time.
Once I set
1, the fleet both activated successfully and I was able to remote in using
aws ssm start-session. The GameLift environment variables aren't present in
install.sh or for the remote user, so I imagine they must only be set for the shell that runs the game server process itself.
Sharing some troubleshooting notes for anyone else that runs into this error message (with a focus on Unreal, but it could be applicable to any game server).
Make sure your game server runs correctly locally:
- Follow the directions to test locally with Anywhere.
- Test by passing in the params as command line arguments. For unreal that looks something like:
./GameServer -authtoken=<authtoken> -hostid=DevLaptop -fleetid=fleet-xxxxxxx -websocketurl=wss://us-east-1.api.amazongamelift.com
- When running with On Demand EC2 instances, the process needs to get those details via environment variables instead of command line arguments. Test that this works locally with a command something like this:
GAMELIFT_SDK_WEBSOCKET_URL=wss://us-east-1.api.amazongamelift.com GAMELIFT_SDK_PROCESS_ID=1 GAMELIFT_SDK_AUTH_TOKEN=<authtoken> GAMELIFT_SDK_HOST_ID=DevLaptop GAMELIFT_SDK_FLEET_ID=fleet-xxxxxxx ./GameServer
Make sure you aren't overloading the server:
- Set ConcurrentExecutions to
- Consider setting GameSessionActivationTimeoutSeconds to
300or higher, just to test. The default seems to be 30 seconds, which is probably long enough for most game servers, but it's worth testing with a higher value just to make sure that's not what's happening.
- Not necessary to test, but consider setting MaxConcurrentGameSessionActivations to something like
1. The default is to effectively start every process at the same time, which might be rough for something like Unreal.
Obviously dial in all these settings for what makes sense for your particular use case once you get it working initially, these are just helpful as a test baseline.
- asked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 5 months ago
- EXPERTpublished a month ago