My game server is working fine on gamelift local, but after creating the fleet from the build. I created a game session with lambda function called by client and after recieving player data, i am trying to connect to a TCP port opened on game server. But the server is refusing my connection.
Can anyone please help me out. Thank you!
Theres two typical reasons for this assuming you are seeing timeouts connecting / connections refused.
- Fleet ports aren’t open on the fleet / GameLift is blocking your connections
By default a GameLift fleet does not allow any incoming connections. You have to explicitly open the ports required during fleet-creation or (on an Active/Error fleet) using update-fleet-port-settings.
You can check whats open on your fleet any time by using:
Check that the expected ports are open and/or restricted by CIDR ranges that make sense for your use case.
- The Server is not listening on the port it claims to be listening on
You also need to ensure your server is listening on the expected port (the port it reported in ProcessReady). You can remote into the GameLift instance to check this from your logs or via command line etc.
Typically the server listen port is passed in via a parameter during fleet-creation time but some users auto-configure their ports on server launch. Either way its good to have a log statement or other means to validate the port the server is on etc.
Note: You’ll need to ensure the SSH/RDP port is open for remote connections on the fleet (see above) depending on the OS type.
Hope that helps.
I am not able to connect update port settings for remote instance connection
An error occurred (InvalidRequestException) when calling the UpdateFleetPortSettings operation: 1 validation error detected: Value ‘RDP’ at ‘inboundPermissionAuthorizations.1.member.protocol’ failed to satisfy constraint: Member must satisfy enum value set: [UDP, TCP]
Also I checked inbound settings of my fleet they were fine still when my client is trying to connect to Server, the connection is refused.
To update fleet port settings for RDP you would do something like (as its seems like you have a windows fleet):
Its important that you can remote into an instance so you can confirm the server port settings and see what the server is seeing wrt to connections. Theres a complete set instructions for remote access for Windows fleets via the console here: Windows Remote Access won't connect to GameLift Fleet, what am I doing wrong?
From a client POV It may be useful to capture what errors the client is seeing and, if you are using TLS, confirm that the security materials required are installed.
I understand how frustrating tracking down client/server connections can be, but the first thing we need to do is see both ends (as much as possible) of the communication attempt.