question

Oliver Schöckl avatar image
Oliver Schöckl asked

Windows Docker Local Agent no connection possible

Hi there,

i'm new to playfab so please don't be too hard too me...

I installed docker and the Local MultiplayerAgent, and started the container (windows) which works fine, got heartbeat etc, sadly i can't manage to connect with my client. i tried to connect to "127.0.0.1:56100" where 56100 is the node port.

I'm using a Litenetlib based transport (UDP), i also tried to add a additional UDP Rule in the firewall settings (similar to the TCP Rule created from the powershell script)

I can't see any logs for a client try to connect at the host container logs, server starts normally, thats make it hard to debug, but i'm pretty sure this issue has something to do with the docker setup as a normal connection ist working fine (also on dedicated servers).

Here my PortMapping Settings:

   "PortMappingsList": [
     [
       {
         "GamePort": {
           "Number": 7777,
           "Name": "game_port",
           "Protocol": "UDP"
         },
         "NodePort": 56100
       }
     ]
   ],

Thanks for your help!

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

Oliver Schöckl avatar image Oliver Schöckl commented ·

Additional Info:

i found its working when i change the gameport to the nodeport 56100, but that seems wrong accordingly to the documentation.

0 Likes 0 ·

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

The config means that the container port 7777 is mapped to local port 56100. And the game port should be the port your server is listening to. Also, does “i found its working when i change the gameport to the nodeport 56100, but that seems wrong accordingly to the documentation.” mean you changed the Number parameter under GamePort config to 56100? If your server is listening to 56100, the config is correct. If not, may I know which port your server is listening to?

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.

Oliver Schöckl avatar image Oliver Schöckl commented ·

Hi there!

thanks for your answer, apologizes for my late reply.

i assign the Port on the Server dynamiclly like its shown in the demo, this seems to work fine when i check the docs.

 const string ListeningPortKey = "game_port";
             var portInfo = connInfo.GamePortsConfiguration.Where(x => x.Name == ListeningPortKey);
             if (portInfo.Count() > 0)
             {
                 Debug.Log(string.Format("port with name {0} was found in GSDK Config Settings.",
                     ListeningPortKey));
                 Debug.Log(string.Format("Port will be set to {0}.", portInfo.Single().ServerListeningPort.ToString()));
                 InstanceFinder.TransportManager.Transport.SetPort((ushort)portInfo.Single().ServerListeningPort);
             }

Here the new Port Mapping settings:

 "PortMappingsList": [
     [
       {
         "GamePort": {
           "Number": 56100,
           "Name": "game_port",
           "Protocol": "UDP"
         },
         "NodePort": 56100
       }
     ]
   ]

This setting is working, but with game port number 7777 it does not work.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Oliver Schöckl commented ·

Can you follow Can I connect "inside" a running container to see what's going on? and How can I see the ports that are open on my container? to connect to your local docker container to see the Ports info about your container?

0 Likes 0 ·
Oliver Schöckl avatar image Oliver Schöckl Gosen Gao commented ·

Yes I will check this tomorrow, I probably don’t find the time today, if I recall correctly (as I did this before opening the thread) it has shown me the node port 56100 but not 7777 as configured in the json.

I will update this

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.