question

sauliusvince avatar image
sauliusvince asked

[Mirror + Playfab] Problems with deployed server and message sending

Tile id: 12A0D

Hello, I'm trying to make the dedicated server work. First of all, I have a fully functioning video game (2 clients and 1 server (tested locally with mirror)). However, when I upload the server to playfab it seems that the sync vars do not work and I don't get most of the messages ( some still work ). I checked the playfab server console and it seems there are no errors. It should be noted, that when testing playfab locally I get the same errors.

In short:

What works:

I can connect 2 players to the match successfully

Does not work:

Most of the messages from the server are not being received.

Variables are not syncing

Sincerely,

sauliusvince

Matchmaking
10 |1200

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

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

1. Have you checked our Mirror sample here? MpsSamples/UnityMirror at main PlayFab/MpsSamples (github.com)

2. Have you used LocalMultiplayerAgent to make sure your game server integration with our Game Server SDK works? PlayFab/MpsAgent: Azure PlayFab Multiplayer Servers LocalMultiplayerAgent project and helper libraries (github.com)

10 |1200

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

sauliusvince avatar image
sauliusvince answered

Hello,

1. Yes, I was doing my project somewhat similar to provided Mirror Sample. However, I noticed that server uses telepathy transport, while I'm using KCP transport. I don't believe that this is the issue...

2. Yes I have tested with LocalMultiplayerAgent and I get the same results as from the dedicated server, that I uploaded into Playfab.

To be more clear, I will list the steps that I tested my game and why I find it strange.

1. I opened 3 tabs, 2 of them are built into the Windows platform and 1 is built into a dedicated server. Then, I connected clients with the server and everything works as intended, with 0 errors.

2. I tested with LocalMultiplayerAgent, I created a Linux container and it seems that when I connect my clients and start my game, the server is having problems sending information to clients, however, it does not produce any errors.

3. I tested by uploading my server into Playfab and using matchmaking I connected my clients, I still have the same problems as in 2.

Lastly, when inspecting logs produced by Playfabs I noticed 1 strange error, that I believe is not produced by my server.

{"log":"Curl error 35: Cert handshake failed. verify result: UNITYTLS_X509VERIFY_FATAL_ERROR. error state: 7\n","stream":"stdout","time":"2022-05-31T10:42:49.533967088Z"}

{"log":"Curl error 35: Cert handshake failed. verify result: UNITYTLS_X509VERIFY_FATAL_ERROR. error state: 7\n","stream":"stdout","time":"2022-05-31T10:42:49.534983807Z"}

{"log":"Unable to complete SSL connection\n","stream":"stdout","time":"2022-05-31T10:42:49.561478487Z"} {"log":"Unable to complete SSL connection\n","stream":"stdout","time":"2022-05-31T10:42:49.561612789Z"}

Finally, I'm attaching the console log if further inspection is needed.

Sincerely,

sauliusvince


pf-consolelogs-4.txt (345.8 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.

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

Thanks for posting the logs. First of all, the server transitions to the Active state so the lifecycle flow looks great, from a PlayFab game server perspective. However, the server seems to exit (crash?) right after the UNITYTLS_X509VERIFY_FATAL_ERROR error.

I don't think that the UNITYTLS_X509VERIFY_FATAL_ERROR is caused by any code we have in the Game Server SDK. Are you trying to connect to any external HTTPS services? If you are using a Linux container, sometimes they don't have the necessary certificates installed. Can you try updating your certificates in your Dockerfile? Something like this might do the trick

https://stackoverflow.com/a/65081589

10 |1200

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

mirkosrsen avatar image
mirkosrsen answered

Dockerfile is the issue u need to instal certificates when building. Dockerfile should look like this:

FROM ubuntu:20.04

WORKDIR /game

ADD . .

RUN apt update

RUN apt install -y --reinstall ca-certificates

EXPOSE 7777/udp

CMD ["/game/Game.exe"]

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.