question

michal-oglozinski avatar image
michal-oglozinski asked

How to deploy Java server in Multiplayer 2.0

Hello,

we are looking into the Multiplayer 2.0 and as we're able to write and deploy C# written server, but stumbled into a wall while trying to do the same with Java wrote one. We've bundled it with OpenJRE and deploy it with the command: "C:\Assets\jre\bin\java.exe C:\Assets\gameserver.jar" or even "C:\Assets\jre\bin\java.exe game-server.jar". Unfornetly the server is always in an Unhealthy state after deployment.

Is there any documentation on how to handle Multiplayer 2.0 custom server deployment for Java?

We would also ask if there is more info about using Linux? We are pretty sure we stumbled somewhere on info it is indeed possible, but couldn't find anything more on that.

Cheers

Michał

sdksCustom Game Servers
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.

michal-oglozinski avatar image michal-oglozinski commented ·

To follow up. We've managed to test it locally and got some more info. It looks like gsdkConfig.json is missing some fields required by Java version of SDK. Same json configuration is produced by the c# and java SDKs, but the last one requires fields like buildMetaData which are missing.

0 Likes 0 ·

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Did you refer to PlayFab GSDK github page? You can find several types of sample on our github page, please click the link to navigate to it. In the java folder, there are some assets you will need when you run the Java Game Server. In the cpp folder, we can find the LinuxTestApp.

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

michal-oglozinski avatar image michal-oglozinski commented ·

Hi Sarah, thank you for your reply. We are aware of the examples but they are code only, we have no problem with that part. The deployment pipeline is the question mark here.

1. How should we test locally with MockVmAgent deploy Java build server? In order for it to work, we had to change and recompile HeartbeatThread.java from Java GS SDK.

2. How can we deploy Linux server? Is PlayFab switching between Windows and Linux instances under the hud depending on the uploaded content during the server build? Or is there some option we need to pick?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang michal-oglozinski commented ·
  1. We haven’t tested to locally debug Java build server with MockVmAgent yet. We will try to test it then update later.
  2. We have this doc Deploying Linux based builds. You can check it. But currently, Game Manager graphical UI hasn’t added the Linux radio button option in it. You can try to use command-line tools to upload your container images.
0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Sarah Zhang commented ·

[Updated]

1. Some customers in Enterprise tier have deployed Java server with the Linux container. Currently, If you are in the Pro or Enterprise tier, you can navigate to [Game Manager]->[Help]->[Report an issue] to contact our team for more info.

2. Game Manager graphical UI already has an updated plan.

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.