grpctunnel
grpctunnel copied to clipboard
How to debug connection problems?
I cannot get the grpctunnel client and server to establish a connection.
Environment: Windows running Docker containers
Steps to reproduce
Start Docker container #A using an Ubuntu 20.04 image
In container #A, build the grpctunnel server from source
In container #A, run the grpctunnel server
In container #A, execute netstat -l
and ss -tanp
and note the ports with listeners
Outside of the containers, create a docker network, NetFoo. Outside of the containers, attach container #A to NetFoo. Execute docker inspect on Container #A and note the IP within NetFoo.
Start Docker container #B using an Ubuntu 20.04 image Outside of the containers, attach Container #B to NetFoo. In container #B, build the grpctunnel client from source In container #B, run the grpctunnel client with the -tunnel_server_address flag and the IP and port information noted previously.
Expected Result Client connects to the server successfully.
Actual Result:
~/grpctunnel# ./tunnelclient -tunnel_server_address 172.21.0.7:33479
2021/11/11 20:45:35 dial target (type: ) not found. reconnecting in 552.330144ms (all targets found: map[])
2021/11/11 20:45:35 exiting: start: failed to create register stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 172.21.0.7:33479: connect: connection refused"
Different ports in the parameters for the client do not work for me. Running the server with IP set to 0.0.0.0:4444 or others does not work for me.
Any guidance would be appreciated.