question

nz-game-dev avatar image
nz-game-dev asked

Test Playfab Hosted Server Without Matchmaking

Hello,

I have a build uploaded using the Servers 2.0 (Preview) web portal with a region setup and 5 servers starting on StandBy. I then used powershell calling New-PFMultiplayerServer from the PlayFabMultiplayer module and this allocated one server from StandingBy state to Active state. I remoted into the virtual machine and ran docker ps matchingthe active Playfab Server ID to the docker container ID to determine the docker port mapping from host (ithink, don't know docker?) to container with UE4 server instance (0.0.0.0:30004->7777/udp).

I have tried to connect to the UE4 server using <virtual machine IP>:30004 but it doesn't work, should it? I was trying to imitate the local container tests I ran successfully using MockVMAgent.exe (LocalMultiplayerAgent_v0.7.1) and MultiplayerSettings.json.

I am only just starting out with Playfab and reading up on things I am wondering if it does not work because I have no done any session or matchmaking management.

TitleId = 60E06

MatchmakingCustom Game Serverstest
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.

Citrus Yan avatar image Citrus Yan commented ·

You said that connecting to the server using <virtual machine IP>:30004 doesn't work, can you specify how did you connect to that address and the exact symptom you are seeing?

0 Likes 0 ·
nz-game-dev avatar image
nz-game-dev answered

I tore everything down and started again and got it working. The difference this time was that I added a call to

Enable-PFMultiplayerServer

and I saved the result of the new server call like

$newServer = New-PFMultiplayerServer etcetc

then I could print out

$newServer.Ports which gave me the correct ports to use which was something I saw a similar post mention - I havent used powershell as well as docker much until playfab sorry for the noobness

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.

Citrus Yan avatar image Citrus Yan commented ·

Can you establish the connection between the client and the new server now?

0 Likes 0 ·
nz-game-dev avatar image nz-game-dev Citrus Yan commented ·

Yep that's correct

0 Likes 0 ·
nz-game-dev avatar image
nz-game-dev answered

@Citrus Yan

I just launch our client and open the UE4 console with ~ then type in 'open <vm public ip address>:<container host port>'. The expected result is a connection is established and the client opens the map the server is sitting on and is connected as a remote client.


I tried again today activating another server this time the docker container host port mapping was

0.0.0.0:30001->7777/udp.

I RDP'd back in using <vm public ip address> with credentials from the servers page (connect button) and ran 'docker inspect <container id> of the second active server and navigated to the logging dir that is mounted, in this case 'D:\\ExtAssets\\SH1\\A0'

Browsing to the ue4 log dir and looking at the current log I see something like this

'[2019.12.16-08.07.29:843][ 0]LogLoad: (Engine Initialization) Total time: 173694.18 seconds' which tells me the server was blocked on the 'Microsoft::Azure::Gaming::GSDK::readyForPlayers()' call until it just became active 48 hours later which matches up with my deployment and second test.

After that line in the log there is just miscellaneous entries about garbage collection and no entries about incoming connections or rejected connections from the client join attempts I tried after activating another server.

On the client side the logs just show the connection attempts timing out after one minute with no useful info.

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.