0

Could not open port on GCP Compute Engine VM instance

Hi,

I need to open port 5000 on my GCP instance. Tried doing that by adding a firewall policy opening all ports to the region. See Image

Didn't work, pinged the port and it is still closed.

Port 5000 closed

% telnet <ip_address> 5000
Trying <ip_address>...
telnet: connect to address <ip_address>: Connection refused
telnet: Unable to connect to remote host

Port 22 works

% telnet <ip_address> 22
Trying <ip address>...
Connected to <ip address>.bc.googleusercontent.com.

What else do I need to do?

Thanks!

beanie
  • 1
  • 1
  • 1
    Hello there! Are you sure something is listening on port 5000? What error do you get? Timeout? – Armando Cuevas Nov 13 '22 at 16:40
  • Please provide enough code so others can better understand or reproduce the problem. – Community Nov 13 '22 at 22:54
  • The error is: unable to connect to remote host. I am running the code with a docker container with network_mode="host" Do I have to specify something else in the firewall / docker compose file? – beanie Nov 14 '22 at 10:55

1 Answers1

0

Problem solved and the port is open! I didn't do anything else, the configs were fine. Maybe a delay / cache somewhere.

Thanks @armando-cuevas

beanie
  • 1
  • 1