-
Notifications
You must be signed in to change notification settings - Fork 291
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
Passing through Port 514/UDP eventually stops passing through #14435
Comments
I rolled back to docker desktop 4.34.3 and still see the same issue. This time when it happened, I exec'd into a bash session and played a bit more.
I also installed netcat inside it so I could send some UDP packets directly to see if my syslog server gets them. Trying the ipv4 address:
and it gets logged by the syslog server. Similarly trying loopback:
gets logged as well. So the python app is definitely alive and happy inside the container. Just docker is losing the port forward for some reason. |
Here is the output of docker inspect when the container is in this weird state:
|
As one additional piece of info, while the container is in this state, I went back to windows and successfully started the same syslog server just fine, further showing that the port forwarding stopped (since i could bind to the port in windows, even though the container is supposed to be bound / passed through to that port). |
Description
I have a simple server that listens on port 514 via UDP and just prints what it gets. (It's a very sketchy syslog-ish server). After a while (seemingly once a day-ish it just stops listening on port 514.). The app inside the container is still running.
Inside the container, i can see my process is still listening on 514:
In
ps auxx
:Though outside the container in Windows, it seems like port 514 is no longer in use:
Though when i first started (until the passthrough stopped) it would show up in windows via ^ as well.
Here is a simple repro for csmutil/syslog_server.py:
I'm running against: python:3.10.0-bullseye
If you try to start another instance of the server (inside the same container).. it fails as expected:
Furthermore, docker inspect still shows the port as being forwarded (despite it not being according to Windows):
Reproduce
docker run -p 514:514/udp -it --rm python:3.10.0-bullseye bash
python syslog_server.py
inside the containerGet-Process -Id (Get-NetUDPEndpoint -LocalPort 514)
you should get something. Come back in several hours and run this again, and if it reproduces, it'll no longer find the process listening on port 514, though the docker container (and python script) will still be runningExpected behavior
Ports should be forwarded indefinitely as long as the container is running.
docker version
docker info
Diagnostics ID
C273F745-3836-433C-93C7-2151320BA8E6/20241119221212
Additional Info
I think this started after updating to docker desktop 4.36.0 .. I'm not really sure what version I was on before.
The text was updated successfully, but these errors were encountered: