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.
Bug 1293502 - Docker spawns a docker-proxy process for each port in a container
Summary: Docker spawns a docker-proxy process for each port in a container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Antonio Murdaca
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-22 00:08 UTC by wibrown@redhat.com
Modified: 2019-03-06 01:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-31 23:23:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0536 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2016-04-01 03:19:56 UTC

Description wibrown@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.

Comment 2 Mrunal Patel 2015-12-22 17:10:56 UTC
Wasn't there an option to use iptables instead of the userland port proxy?

Comment 3 Antonio Murdaca 2015-12-22 19:26:34 UTC
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 5 wibrown@redhat.com 2016-01-20 02:13:26 UTC
I believe that using the iptables rules prevents container to container communication.

Comment 6 Antonio Murdaca 2016-01-20 09:22:49 UTC
could you tell me how you reproduce the blocked container to container communication?

Comment 7 wibrown@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.

Comment 8 Luwen Su 2016-03-20 13:11:57 UTC
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.

Comment 10 errata-xmlrpc 2016-03-31 23:23:11 UTC
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


Note You need to log in before you can comment on or make changes to this bug.