Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionwibrown@redhat.com
2015-12-22 00:08:52 UTC
Description of problem:
Docker spawns a docker-proxy process for each port in a container.
Consider the usage of asterisk in a container. This required the opening of hundreds, if not thousands of ports.
This can cause the docker host to crash.
docker run -it --rm=true --name porttest -p 3000-3010 busybox
In another shell:
ps ax | grep docker-proxy | egrep '30[0-9]{2}' | wc
Should yield 11 processes. If this is increased, such as:
docker run -it --rm=true --name porttest -p 3000-4000 busybox
Your docker host may destabilise, crash or freeze.
How reproducible:
Always
Actual results:
Docker host crashes from the number of spawned processes
Expected results:
Docker host should not crash or freeze, and there should be one docker-proxy for each running container.
Enabling hairpin NAT via the daemon flag "--userland-proxy=false" prevents the daemon from spawning docker-proxy processes. This way the port mapping is achieved via just iptables (as Mrunal said).
Are there any reasons you can't disable userland-proxy? Could you try setting "--userland-proxy=false" and see if the daemon still has issues?
Comment 5wibrown@redhat.com
2016-01-20 02:13:26 UTC
I believe that using the iptables rules prevents container to container communication.
could you tell me how you reproduce the blocked container to container communication?
Comment 7wibrown@redhat.com
2016-01-21 00:18:20 UTC
Here is the information I was sent:
"""
Well, to explain it better, take a host that's on 192.168.0.1, running a Docker container listening on port 5000 (in the container) that's exposed on port 800 on the host. Assume that the first container's Docker IP is 172.17.0.1. Then, take another Docker container on the same host trying to connect to that exposed port;
APP=`docker run -d -p 800:5000/tcp training/webapp python app.py`
curl http://192.168.0.1:800/ # works, of course
docker run --rm -it image curl http://192.168.0.1:800/ # does not work
docker run --rm -it image curl http://172.17.0.1:5000/ # does work
docker stop $APP
docker rm $APP
"""
I haven't tried this myself yet however.
In docker-1.9.1-23.el7.x86_64, move to verified.
Just to be noted,
It's better not try `docker run -it --rm=true --name porttest -p 3000-4000 busybox` in remote machine which used network is not strong enough.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-0536.html
Description of problem: Docker spawns a docker-proxy process for each port in a container. Consider the usage of asterisk in a container. This required the opening of hundreds, if not thousands of ports. This can cause the docker host to crash. docker run -it --rm=true --name porttest -p 3000-3010 busybox In another shell: ps ax | grep docker-proxy | egrep '30[0-9]{2}' | wc Should yield 11 processes. If this is increased, such as: docker run -it --rm=true --name porttest -p 3000-4000 busybox Your docker host may destabilise, crash or freeze. How reproducible: Always Actual results: Docker host crashes from the number of spawned processes Expected results: Docker host should not crash or freeze, and there should be one docker-proxy for each running container.