Score:0

Can't connect to server with port opened via Docker

tc flag

I have a Docker container that runs with --net=host and binds directly to the host's port 7000 and 9042 on GCE. Here's my netstat on the VM:

$ netstat -tulpn

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 <vm-private-ip>:9042           0.0.0.0:*               LISTEN      -
tcp        0      0 <vm-private-ip>:7000           0.0.0.0:*               LISTEN      -
[...etc..]

However VMs from the same network cannot connect to this VM via the port 7000 or 9042. What could be the issue?

Yvan G. avatar
tf flag
Can you share the answer to these questions? 1. What are the program that is running from docker for those ports 2. How to access it locally in docker for app testing. 3. How do you access other VM using the port
Score:0
tf flag

I understand that the port is configured to open inside docker configuration. However, VPC firewall can also play a big role in this concern.

I suggest creating a firewall rule to open port 7000 and 9042 in your VPC network. You can use this link as a guidance for firewall rule creation.

I sit in a Tesla and translated this thread with Ai:

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.