question

Jacob Merrette avatar image
Jacob Merrette asked

MPS Server Curl error 28

Hi, I am currently trying to do the set-up for local debugging game server containers on my local machine, but I am hitting a bump. Here is the list of tools I am currently using:
- Windows 10 Pro (latest version)
- Docker (latest version)
- MPS Sample's UnityMirror project(using it as a test run before using my actual game)
- LocalMultiplayerAgent 0.9.8
- Unity 2021.1.7f1
- Following guide from MSFT Docs for Windows Container

The issue: when starting the server via the LocalMultiplayerAgent, the powershell keeps waiting for HeartBeat. Looking at the server logs I get a Curl Error 28 as its unable to connect to my IPV4(localhost) address:

state: PlayFab.MultiplayerAgent.Model.HeartbeatRequest, payload: {"CurrentGameState":"StandingBy","CurrentGameHealth":null,"CurrentPlayers":[]}
Curl error 28: Failed to connect to MyIP port 56001: Timed out
CurrentError: Request timeout - b9a6715f-6613-4760-a842-1d12f16142da
Retrying heartbeat in 30s
Request timeout


The process method did work when I tried it.
Note that when my server is waiting for timeout, I can still see my client connect & disconnect:

Client Connected
The PlayerPrefab is empty on the NetworkManager. OnServerDisconnect: Client disconnected.

I tried starting from scratch, but the result remains the same.

multiplayer
10 |1200

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

Jacob Merrette avatar image
Jacob Merrette answered

It was my firewall. For some reason even after allowing all the proper ports it interfered. After disabling the firewall it finally worked.

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 answered

This error seems to be the port conflict issue. There could be another process that was taking the same port. Please follow the steps below to troubleshoot:

  1. run Powershell in administrative mode
  2. Run -> docker ps -a. If there are any containers listed in the result, it will cause pending at waiting for heartbeats.
  3. According to Locally debugging game servers and integration with PlayFab - PlayFab | Microsoft Docs. run the command to remove all containers. You may also use -> docker rm [container ID] to do the same thing.
  4. Run the setup.ps1 if necessary, then run the multiplayer agent again.

Please refer to this thread: https://community.playfab.com/questions/52890/containerized-server-not-connectable.html.

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.