Ok so what I’m trying to do is communicate with a rest server running on a multiplayer server.
Here’s where I’m at
// I have obtained the FQDN of the multiplayer server like so
const response = multiplayer.RequestMultiplayerServer({ PreferredRegions: [“EastUS”], SessionId: “some_session_uuid”, BuildId: “some_build_uuid” }); const fdqn = response.FDQN;
The REST Server is listening at http://0.0.0.0:3700/ or http://*:3700 and I am making requests from the serverless node to the rest server like so
const restServerUri = http://${fdqn}:3700/moves/get-legal-moves
; const response = http.request(restServerUri, ‘get’, ‘application/json’);
This produces a ’TimeOut’ response
When I went to check that my requests are actually reaching the rest server I observed the stdout logs inside the docker container it’s clear that my get request is never reaching the server.
So I thought we might be using the wrong port.
When I RDP’ed into the windows VM I opened up a terminal w/ admin permission and randocker ps. I noticed that there appear to be external ports mapping requests made to the VM to the ports I added when I made a build.Example:
0.0.0.0:30001 -> 3700/tcpWhere 3700 is the port the rest server should be listening on.
So I changed the restServerUri to http://${fdqn}:3700/moves/get-legal-moves
; and I’m still getting a ‘TimeOut’ response and I’ve verified that the request never hits the rest server.
How would I construct the restServerUri using information from the response of the RequestMultiPlayerServer request?