question

Andrei Patrascu avatar image
Andrei Patrascu asked

The port in GetMatchResult after a succesfull GetMatch result is incorrect,

After I get a successful GetMatch response in the GetMatchResult the port in ServerDetails is different from the one on the server. I get 3000x but the server uses 5000x.

,
10 |1200

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

Seth Du avatar image
Seth Du answered

PlayFab MPS is running via Docker, and the RDP login information in playfab3.png is for developers to connect to the VM. If you successfully log into the VM, please also try "docker ps" to check the running containers (server instances).

A player will never access RDP information of your VM and they can only get connection information from GetMatch() or RequestMultiplayerServer().

What connection method or network framework do you implement in your server? You may refer to MpsSamples/UnityMirror at main PlayFab/MpsSamples (github.com) to implement your server.

10 |1200

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

Xiao Zha avatar image
Xiao Zha answered

This is normal if your server build run on container mode, because on container mode, your server process starts at 7777 but during container creation the 7777 is mapped to 56100(for example) on the VM level. So the client will send packets to 56100 on the VM and these will end up to 7777 on the container. It’s called port mapping. For more information about containers please refer to Container.

1 comment
10 |1200

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

Andrei Patrascu avatar image Andrei Patrascu commented ·

I undestand that but the client gets port 30001(for example) from the GetMatchResult which is wrong and cannot connect to the server because the server is mapped to 50001(for example)

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

Sorry for the late reply. May I know how you find that the actual port your server is mapped to is different from the port you obtain from GetMatchResult? Since in my test, the two port numbers are the same.

4 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.

Andrei Patrascu avatar image Andrei Patrascu commented ·

On the client side the port from GetMatchResult from PlayfabMultiplayerAPI.GetMatch() is 30001 and when I try to connect to the server using the received ip and port it doesn't work. And I check in the playfab dashboard, in Servers, the port of the server is 50001. If I manually input the port to 50001 the client will start connecting.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Andrei Patrascu commented ·

May I have your Title ID ? And you can try calling RequestMultiplayerServer API to see if the IP and port are different from what the playfab dashboard shows.

0 Likes 0 ·
Andrei Patrascu avatar image Andrei Patrascu Xiao Zha commented ·

25A7B. I tried with the RequestMultiplayerServer API as well and it is the same

0 Likes 0 ·
Show more comments
Andrei Patrascu avatar image
Andrei Patrascu answered

playfab1.png (55.0 KiB)
10 |1200

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

Andrei Patrascu avatar image
Andrei Patrascu answered

The first is the port i get in unity from GetMatch and the second is from the server on playfab dashboard

playfab2.pngplayfab3.png


playfab2.png (45.6 KiB)
playfab3.png (14.2 KiB)
10 |1200

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

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.