Open richturner opened 4 months ago
Hi @richturner,
Thanks for the kind words!
This is an interesting one, mind sharing what TCP app you’re testing? I’m wondering if there’s something we should be doing on the tunnel side that clients for that app expect. The other follow-up was just ensuring the docker container can access 192.168.5.1:80
fine, but it sounds like you’ve already verified that.
Best,
Thanks for the reply.
Indeed the IP address is reachable from within the docker container and a curl command from within the container works fine.
The service I was trying to access is actually a router HTTP UI (dd-wrt) but I tried a couple of different router web UIs on different LANs and the curl command always hangs at the same point here:
$ curl -v http://test3.openremote.app:9001
* Trying xxx.xxx.8.193:9001...
* Connected to my.server.com (xxx.xxx.8.193) port 9001 (#0)
> GET / HTTP/1.1
> Host: my.server.com:9001
> User-Agent: curl/7.87.0
> Accept: */*
>
After your comment I have now tried with an actual raw TCP server and that seems to work fine so it is something to do with the combination of curl and/or the HTTP server(s), but given I have tried multiple HTTP servers with the same result and also the fact that the curl works fine when tunnel is established outside of a docker container it suggests there is something subtle happening here with the interaction of docker. Worth noting I tried running the docker container with host network mode (to eliminate docker networking and the same error situation occurs).
It was accidental using a TCP tunnel to access a HTTP server as it was just quicker to use for testing as HTTP servers were already running to test against.
It is clear that this failure mode is pretty bad as the rate of socket descriptor creation is very quick and doesn't stop until I terminate the tunnel, terminating the curl request does not stop it.
Hopefully this helps shed some light on what might be causing this situation, I guess for now we should avoid accessing HTTP servers over TCP tunnels through a docker container.
Thanks again and let me know if there's anything I can do.
Hi,
Thanks for this great project!
I have an interesting situation where I am trying to create a TCP tunnel to SISH from within a docker container, the tunnel establishes OK but when I make a request that uses it the response stops half way through and in the sish logs I just see new socket descriptors being constantly created until I close the tunnel:
The SSH command I am using to create the tunnel within a docker container is as follows:
If I use the exact same command outside of docker then it seems to work fine.
When running the command within a docker container I see this constantly repeating in the output:
I'm running out of ideas on this one so hoping someone may have some insights that could help.