-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Published port "connection refused" permanently if connected before listening #5648
Comments
I've had this issue too, only in rootless. Restarting the container usually helps, but not always. It also applies to pods themselves. To fix it in a pod, I have to restart the pod. Edit:
|
@giuseppe @AkihiroSuda I feel like we may have fixed this one already? |
Having the same issue. I'm staring a shell in an interactive container( |
A friendly reminder that this issue had no activity for 30 days. |
@giuseppe @AkihiroSuda Any comment on this one? |
Maybe fixed in #5183 ? |
yes I think it is fixed upstream, there were few fixes in rootlessport related to it. @ingobecker @jmou could you verify if the issue still persists in 1.9? |
It's fixed. Thanks for the reply. |
It's fixed for me, thanks! |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I have been having this issue for a while and finally found an isolated reproduction. In certain situations, a published port may refuse connections until the container is restarted, even if there is a container process listening. This appears to happen if connections are attempted to the port before there is a listener. In my testing, at least two connections must be attempted to the port before the listener connects.
Steps to reproduce the issue:
Describe the results you received:
All netcats fail, no output on first terminal, first terminal does not quit on Ctrl-C.
Describe the results you expected:
First two netcats are expected to fail because the first terminal's netcat is not yet listening. However the third netcat should succeed, and hi should be output.
I have tested this with Docker and the results are similar to what I expect, but I would expect the first two netcats to fail (I only see output on the third netcat):
Additional information you deem important (e.g. issue happens only occasionally):
I am only able to reproduce this if at least two of the netcats are run while the first terminal is sleeping. If only one (or zero) netcats are run while sleeping, everything behaves as expected. Also perhaps of note is the first error is connection reset and the second and subsequent errors are connection refused.
I know slirp4netns is related to podman networking, but I don't know enough about the internals to be sure where the bug is, so I reported it here. I am using rootless podman.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
physical
The text was updated successfully, but these errors were encountered: