FleetIQ Cannot update Game Server status from UTILIZED to AVAILABLE from CLI and SDK

0

I have set up my AWS account and I am integrating fleetIQ in a sample spring boot java project. I have created a Game Server Group named "TestGameServerGroup" and in my backend code I am listing the game server group. After that I am registering Game Server name "game-server-1" in my sample EC2 spring boot project.

Now when I update the status of the game server "game-server-1" to "UTILIZED" I cannot change it back to "AVAILABLE". I am trying to update it with SDK and CLI both, but none of it works.

The error that I am getting is "An error occurred (InvalidRequestException) when calling the UpdateGameServer operation: Unable to update game server from UTILIZED to AVAILABLE"

Command used to set UTILIZED status "aws gamelift update-game-server --game-server-id game-server-1 --utilization-status UTILIZED --health-check HEALTHY --game-server-group-name TestGameServerGroups"

Command used to set AVAILABLE status which gives InvalidRequestException. "aws gamelift update-game-server --game-server-id game-server-1 --utilization-status AVAILABLE --health-check HEALTHY --game-server-group-name TestGameServerGroups"

Why am I getting this error and can we directly update status to AVAILABLE after setting to UTILIZED? When are we supposed to set these particular statuses? Am I supposed to call any other GameLift FleetIQ API before setting status to AVAILABLE?

posta 2 anni fa229 visualizzazioni
1 Risposta
1
Risposta accettata

Hi,

This is an expected error. You may not update a game server's utilization status from UTILIZED to AVAILABLE.

This doc has a basic guideline on when to update your game server utilization status, down in "Update game server status": https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-integrate-gameserver.html

In short, your game client will attempt to acquire a game server by calling ClaimGameServer. From there, either the Game Server Group will look for an AVAILABLE Game Server OR the given Game Server must be in AVAILABLE status. If an AVAIlABLE Game Server is found, in 60 seconds either the game client or game server needs to call UpdateGameServer to set that Game Server to UTILIZED.

AWS
con risposta 2 anni fa
profile pictureAWS
ESPERTO
Toni_S
verificato 2 anni fa
  • Yes. Basically, when a game session ends we have to deregister that server and register a new server in its place to maintain capacity and utilize the EC2 instance.

    For example, out of 100 total capacity of EC2, 50 are being utilized and 5 are getting deregistered, so the servers available to be claimed are 45. To fully optimize resource usage, we need to register 5 new server in that particular EC2 instance.

    Also need to check the server is not in draining state/getting terminated before creating new servers.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande