question

Juan Manuel Martinez avatar image
Juan Manuel Martinez asked

Ports issues.

Hello!

We are experimenting a strange behavior with running instances in Amazon. We are using Unreal Engine so we set up our build command line with special parameter "-PORT=<server_host_port>" in order to pass properly the port selected by Playfab Server Wrangler to our server executable. It works.

The problem comes for example when Playfab gives the port 9000 to our Executable Server and Unreal Engine decides internally to set the port to 9001. This happens if exists another Server instance running on the same machine with the port 9000 already assigned.

So the question is, when the api call StartGame or Matchmake, gives us an IP:Port, Can you ensure in all scenarios that the port given is not being used by another process?

Thanks

Juan,

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Yes, when we start a new game server instance, it will always receive a unique port (for that EC2 server host) in the 9xxx range. So, if the server is started with a server_host_port of 9000, that would only be because no other instance on that host was told to use that IP (or if there was, that it has since exited and been cleaned up).

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Juan Manuel Martinez avatar image Juan Manuel Martinez commented ·

Ok, another question regarding this topic.

When you have some active game in Multiplayer/Active Games tab, and then you Terminate one. It is supposed that this instance (and obviously the .exe defined on build) is going to be killed?. We have made the next test.

After create one match in a dedicated server and once the player is inside the match, we "Terminate" the instance. What we see is the player continuing playing and our server continuing running without problems. This case is easy to reproduce.

The "active game" is correctly removed from the tab. But it continues like a phantom game. The game will not be retrieved when GetCurrentGames is called, but if the server was running in the port 9000, and the server wrangler starts a new game in port 9000... we get a port conflict. The new instance, won't be running in 9000, it will be running in 9001, but that's because Unreal has a process which checks the availability of the port given through "-PORT" parameter.

Is this a bug or maybe we are missing something?

Thanks

Juan,

0 Likes 0 ·
brendan avatar image brendan Juan Manuel Martinez commented ·

We'll need to coordinate some time with you to have a look at that, post-GDC. When the terminate button is hit, we tell the server in question to shut down. Reviewing the instance termination documentation in EC2, it's technically possible that the custom game server code could block the shutdown scripts from running temporarily. Please open a ticket with us on this, and we'll coordinate a time with you next week.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.