question

cyn80171229 avatar image
cyn80171229 asked

MultiplayerServer CreateBuildWithCustomContainer Can't Matchmake

1.MultiplayerServer/CreateBuildWithCustomContainer created a server instance 2.MultiplayerServer/RequestMultiplayerServer activates the server 3.Admin/ModifyMatchmakerGameModes created gamemodes

{ "BuildVersion": "game_1.0", "GameModes": [ { "Gamemode": "0", "MinPlayerCount": 2, "MaxPlayerCount": 25 } ] }

I have been successful here.Then the error begins

1.Admin/GetServerBuildInfo

Response

{ "code": 400, "status": "BadRequest", "error": "BuildNotFound", "errorCode": 1032, "errorMessage": "Game server build not found" }

2.Client/LoginWithCustomID after successful login, call Client/Matchmake

Request body

{ "BuildVersion": "game_1.0", "Region": "Japan", "GameMode": "0", }

Response

{ "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Game build not found: 3d_texas_1.0" }

So far my server has been active. Using CustomLinux, the code language is Java, it was created as image and successfully uploaded to playfab.


Test using postman

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.

cyn80171229 avatar image cyn80171229 commented ·

Another problem, I used netty, in the process of starting the GSDK, the start of netty should be placed before or after GSDK.start. Then port and ip should I get from where I found that in the server instance created with the image, the ip of a vm server is fixed, the port does not know how it grows, it is more confused, I hope to give an answer. Thank you

0 Likes 0 ·

1 Answer

·
JayZuo avatar image
JayZuo answered

For the IP and prot issue, if you mean the IP and port used by clients to connect to server, then they should be returned by RequestMultiplayerServer method or GetMatch method if you've integrated new Matchmaking system with PlayFab Multiplayer Servers.

If you mean the port used in server, then it should always be the one you've set in your build. You can hard code this in your server. But we'd recommend you retrieve this port number with using GameserverSDK.getConfigSettings() method like:

//This string should be the one you've set in Ports when creating Build
String ListeningPortKey = "game_port";

// Get all the configuration values
Map<String, String> config = GameserverSDK.getConfigSettings();

// Retrieve port number
if (config.containsKey(ListeningPortKey))
{
    int listeningPort = Integer.parseInt(config.get(ListeningPortKey);
}


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.

JayZuo avatar image JayZuo ♦ commented ·

Admin/ModifyMatchmakerGameModes is used for legacy matchmaking system, which won't work with PlayFab Multiplayer Servers 2.0 (Thunderhead). For Multiplayer Servers 2.0, please use the new PlayFab Matchmaking feature here: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking.

0 Likes 0 ·
cyn80171229 avatar image cyn80171229 JayZuo ♦ commented ·

我会再试一次,谢谢。

0 Likes 0 ·
cyn80171229 avatar image cyn80171229 commented ·
Start netty need ip+port or port, now if you do not apply ip+port mode, I only specify a port, the image deployed on playfab if I do not specify ip playfab will be bound to the external network ip according to the system. The port problem has been solved. I also found the port, as follows.
InetSocketAddress address = new InetSocketAddress(Integer.valueOf(GameserverSDK.getConfigSettings().get("Netty_Socket")));
Thanks answer
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.