question

jpgordon00 avatar image
jpgordon00 asked

Multiplayer 2.0 local debugging: run as container fails

I am following this tutorial. My server runs properly and I see 'ACTIVE' when I set 'runContainer' to false. I also followed these steps and included all the dlls in the directory...and it STILL crashes instantly after runContainer is true.

To be clear: Heartbeat is established in process mode. I am trying to create windows servers.

I have included all dlls listed by ListDlls when I run the program as a process. Could anyone let me know why I can only run in process mode?

PS: Comment or DM me and I can send you a zip of my server.

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.

jpgordon00 avatar image jpgordon00 commented ·

The agent logs to the point where it says: Waiting for heartbeat. It then closes instantly.

0 Likes 0 ·
jpgordon00 avatar image jpgordon00 commented ·

Also, the logs don't contain anything other than 2 lines that describe nothing important.

0 Likes 0 ·
jpgordon00 avatar image jpgordon00 Heather Jones commented ·

I followed the documentation. Let me be clear about the steps I did:

1) Ran the server successfully as a process with the MockVmAgent.

2) Listed and included all DLLs for the project.

3) When I run with runContainer = true, the server crashes instantly and produces no crash log.

0 Likes 0 ·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please tell us do you use a PlayFab multiplayer server sample? If so, which one sample do you use?

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

jpgordon00 avatar image jpgordon00 commented ·

I updated GamePort and it is the correct port that my sever binds to (7777 in my case). I use the same code as this repository. Could I send you my server so you could try running it as a container? It does work as a process.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang jpgordon00 commented ·

Thanks for your clarification. Do you mean when you set "RunContainer" to true, the program would be blocked when "Waiting for heartbeats from the game server.....", and there is no any error message or exception? And this server can work fine when the "RunContainer" is false, is it right?

If so, could you please check that have you checked the [Server Build] option in the Unity's [Build Settings]? To build the Unity Mirror Server Sample, you need to follow this Readme file especially this section Running the Server.

0 Likes 0 ·
jpgordon00 avatar image jpgordon00 Sarah Zhang commented ·

The mirror server correctly starts in process mode, it is not a problem with the code.

When I set 'RunContainer' to true, I get waiting for heartbeats then a crash. Can I please send you my server code?

0 Likes 0 ·
Show more comments
jpgordon00 avatar image
jpgordon00 answered

Sarah, I am using my own modified code base that stems from the repository I posted. My server DOES work in process mode, like I've said, and does listen to the correct port. Since it crashes right after "Waiting for heartbeats", I know the code is setup correctly and its a containerization issue. Can you please try running my server with the Mock VM agent?

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.

Sarah Zhang avatar image Sarah Zhang commented ·

Sure, you can provide your project for us. Before you share it, please notice hide all private info in the project. For example, secret key, player's passwords, etc.

0 Likes 0 ·

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.