Score:0

Can't access GCP container ports externally

br flag

I have set up a containerized instance on Compute Engine and spun up a docker instance of tomcat.

I have a docker-compose.yml file that maps 8080:8080 to the container for tomcat.

I am also spinning up a mongo db which is referenced in the docker-compose.yml file on the default port for it.

The OS instance shows internal and external IP addresses and I have even set up firewall rules to open up port 8080.

If i do a network test internally it reports that the packet arrives but ANY attempt to access the IP address plus port just does not work?

wget http://myipaddress:8080/api/users just hangs

External port scanners also report all ports closed.

I am tearing my hair out as I have been through many pages trying to understand why...

Any help really appreciated.

John Hanley avatar
cn flag
Did you enable the ingress ports in the firewall?
Score:1
ph flag

With John on this one, you're likely missing or have incorrectly set up your ingress rule. You'll want to use something like below, though not exact.

Direction:

  • Ingress

Action:

  • Allow

Targets:

  • Specific target tags input a network tag assigned to the VM

IP Range:

  • IP range(s) you want to be able to access your app

Protocols and Ports:

  • 8080
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.