question

Caleb Smith avatar image
Caleb Smith asked

Question about PlayFabs Mirror Server Sample.

Is there any way to get a bit more clarification on this Unity Mirror Game Server sample you guys have on the GitHub?

https://github.com/PlayFab/MpsSamples/tree/master/UnityMirror

I've built both client and server, and am following the instructions here:

https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/locally-debugging-game-servers-and-integration-with-playfab

I'm able to get the client to connect but then it immediately logs a message saying silent and then disconnects.

I'm also getting a Debug Warning saying:

ReadMessageBlocking: possible allocation attack with a header of: 1213486160 bytes. UnityEngine.Debug:LogWarning(Object) Telepathy.Common:ReadMessageBlocking(NetworkStream, Int32, Byte[]&)

These could be totally unrelated issue. Any help would be appreciated. Thank You.

multiplayergame manager
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.

Rick Chen avatar image Rick Chen ♦ commented ·

Could you please try using the local Windows Containers as this document: https://github.com/PlayFab/MpsSamples/tree/master/UnityMirror#getting-started-for-windows-game-servers-using-local-windows-containers suggest? If the issue still occurs, please let us know.

1 Like 1 ·
Caleb Smith avatar image Caleb Smith Rick Chen ♦ commented ·

I only have Windows 10 home, so I'm having trouble running Windows containers on Docker as the default is Linux servers when you don't have Windows 10 Pro. At this point I was just testing the connection to the game server with the MockVmAgent (not containerized), as described in the document I linked. Do you believe the issues I'm having wouldn't exist when I'm using the container instead?

0 Likes 0 ·
Caleb Smith avatar image Caleb Smith Rick Chen ♦ commented ·

Okay, I paid for the windows 10 pro upgrade so that I could run the project on docker windows containers as described in the link that you posted. I am having the exact same errors.

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ Caleb Smith commented ·

According to my test, if the client’s connecting port is incorrectly set to a non-opening port, it will result in the error you mentioned. It should be set to the game port which is defined in your MultiplayerSettings.json. If you are using the local Windows Containers, the port should be set to the node port instead. Could you please check if the client’s connecting port is correctly set?

1 Like 1 ·
wrong-port.png (80.2 KiB)

1 Answer

·
Caleb Smith avatar image
Caleb Smith answered

There it is. I had the client connecting port set to the agent listening port (56100), rather than the node port (56001). Thank you so much, how frustrating such a simple mistake was. Thought I tried about every combination of ports, apparently I missed at least the right one. Both issues were resolved with this one change, and the client is connecting and staying connected (with silent authorization) until the server Terminates. Just to clarify, when I tried the 7777 as in your image, the server actively rejected the connection. Thanks again! Hope this helps somebody else eventually.

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.