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
port mapping disappear after 'intensive' use #8817
Comments
Seems like |
Same issue in 1.3.1
|
I changed the way my client application uses the rabbitmq-server docker container so that it is less "intensive". Now I don't reproduce the problem, but I can't tell if the issue is still there. I don't know if this issue should be closed. |
I have an issue which can be modeled around this problem too; I'll try to write a test for the situation you described |
Thank you @gdm85 |
can you check if it is fixed for 1.5 |
It is still not fixed for 1.5. |
@cpuguy83 probably needs label "bug" too? |
Still problem
Increasing opened files limit helped (ulimit -n 65535), but it would be great if docker-proxy log it somehow. |
It can still be reproduced on 19.03.11 and 19.03.12. docker run -d -p 8080:80 --name my-nginx nginx:1.18
netstat -ntulp | grep 8080
# tcp6 0 0 :::8080 :::* LISTEN 6237/docker-proxy
# at the beginning of this benchmark, my-nginx can still be accessed through localhost:8080
wrk -t12 -c1000 -d30s http://localhost:8080
netstat -ntulp | grep 8080
# empty
wrk -t12 -c1000 -d30s http://localhost:8080
# unable to connect to localhost:8080 Connection refused
# get my-nginx's ip
docker inspect my-nginx
# my-nginx can be accessed through container_ip:80
wrk -t12 -c1000 -d30s http://172.17.0.2:80 The stackoverflow question: |
Thanks for that additional information, @BlackGlory. From that output, it seems like the I wonder if the system was under memory pressure and if because of that the kernel's OOM killer kicked in, and killed the Looking at that process; docker run -d --name foo -p 8070:80 nginx:alpine
# (I only have a single container running on this test machine)
pidof docker-proxy
4607
cat /proc/4607/oom_adj
-8 I see that the I haven't checked yet where the OOM-score-adj for # remove the container
docker rm -f foo
# create a new container with a negative OOM-score-adjust
docker run -d --name foo -p 8070:80 --oom-score-adj=-200
pidof docker-proxy
5122
cat /proc/5122/oom_adj
-8 So from that, that doesn't appear to be the case. Perhaps we should adjust the OOM-score-adj to be relative to the container's score, so that they (more likely) are either both killed (container including the proxy), or both kept up, otherwise the container keeps running in a somewhat defunct state (ports not accessible). Note that I think the |
Also see #14856 w.r.t. the @BlackGlory if you're consistently able to reproduce the issue on your test-system, would you be able to check if the process was killed by the kernel's OOM killer? You should be able to find log-entries for this in your system log; https://stackoverflow.com/a/15953500/1811501 dmesg | egrep -i 'killed process' or grep -i 'killed process' /var/log/messages |
Afaics, the code doesn't exlicitly set a |
@thaJeztah It doesn't seem to be about the kernel's OOM killer. dmesg | egrep -i 'killed process'
# empty
grep -i 'killed process' /var/log/syslog
# empty |
+1 - also having this issue on a RPi 3B+, with Docker 18.09.1. Also, fyi, in case someone wants to workaround this, and given that the docker-proxy process is restarted alongside a container restart:
|
+1 also having the same issue with docker |
I have a rabbitmq-server docker container created from a self made image (Dockerfile) that expose 3 ports :
4369, 5672, 15672
.I want to use it through a client application that does a lot of tests (open and close a lot of connection in a short time span).
When I use through my client application, it work correctly at first, but after a short time (20-30s), my client application start receiving only "Connection Refused" errors and one of the port mapping disappear.
The initial docker run command I used was :
docker run -i -p 5672:5672 -p 15672:15672 -p 4369:4369 --name="rabbitmq-server" -t rabbitmq-server
I created the container some month ago and it is not running continuously.
So I start it every day with a
docker start rabbitmq-server
command.After starting it, I see the ports mapped in my host interface with netstat :
(I filtered the output to only interesting ports)
After seeing "Connection Refused" errors,
5672
misses the port mapping :(I filtered the output to only interesting ports)
Despite this, the container works fine, other ports are working correctly, the web interface (port 15672) is good.
If I try to connect directly to the container IP it works also :
It is only the port mapping that disappear.
Here's a capture showing the throughput from rabbitmq :
It started consuming at 10:58:35 and there was a break down at 10:58:55 that correspond to the moment since I started receiving "Connection Refused" errors. At its best it was consuming more that 100 msg/s.
It might be related to : #8022 and/or #8428
Host info :
The text was updated successfully, but these errors were encountered: