fix: port(-p flag) connection reset by peer#1197
fix: port(-p flag) connection reset by peer#1197manojmahapatra wants to merge 1 commit intoapple:mainfrom
Conversation
|
@manojmahapatra I'm not yet sure that implicitly starting port forwarders that the user didn't ask for is the answer. I'd want to check whether other applications do this, for one.
|
|
Hi @jglogan, re
I agree w/ the concern here. I initially thought #1180 was just the IPv6 localhost resolution problem, which is what this PR targets. After digging deeper, I don't think this PR fully addresses #1180. The “connection reset by peer” looks more like a backend readiness race. I also saw failures on IPv4. And here is what I did to reproduce the issue;
This sometimes fails during the early startup window and then succeeds once the backend is ready. I don't think I've enough context on the backend readiness to address the issue completely. If you could add some pointers I will be happy to look into it. Having said that, the current changes in the PR fixes only IPv6/localhost binding. Hope this helps. |
|
I was also reading this;
https://docs.docker.com/engine/network/port-publishing/ So does it mean, with Also I realized in container, there is no IPv6 host -> IPv4 container bridging in the current design, which looks like intentional to me. |
Type of Change
Motivation and Context
Fixes #1180
On macOS, localhost resolves to IPv6 (::1) first. Current port forwarder only bound IPv4 by default, so curl http://localhost could fail while 127.0.0.1 worked. This fix adds an IPv6 loopback listener alongside the existing IPv4 bind when publishing without an explicit host IP or when using IPv4 loopback.
Testing