Bug 107583 - Rapid creation of multiple NFS over TCP mounts fails
Rapid creation of multiple NFS over TCP mounts fails
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: nfs-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-10-20 16:14 EDT by Ian McLeod
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-20 06:47:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ian McLeod 2003-10-20 16:14:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
Attempts to mount more than about 140 NFS over TCP mounts from an AS 2.1 client
fail with an "unable to bind to privileged port" error.

This error seems to be the result of a large number of TCP connections on
privileged ports being held in TIME_WAIT.  These connections are on ports 2049
and 32786.  (statd and portmapper).

These errors subside if you wait 60 seconds for the TIME_WAIT sockets to clear.

These errors also occur in AS 3 Beta 2

Solaris _does not_ suffer from this same problem.  We believe this is because it
uses UDP RPC calls for communicating with portmapper and statd.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1) Create 1000 distinct mount points on a server that supports TCP.  In our
case, we have used both NetApp filers and Solaris NFS servers.

2) Write a shell loop on a Linux client that mounts these exports one after the

Actual Results:  The script will fail after about 140 mounts.  It will report
"cannot bind to priveleged port" errors.

Expected Results:  The script should have been able to create almost 800 mounts
before failing due to lack of ports.

Additional info:
Comment 1 Steve Dickson 2003-10-20 16:25:18 EDT
I think the real problem here is that all of the setup communication
needed for the mount (i.e communication to and from portmapper, lockd, statd)
puts privilege ports in a temporary unusable state (i.e. TIME_WAIT). 

Having the setup communications use UDP sockets instead TCP
would take care of the problem.
Comment 2 Elliot Lee 2004-08-20 15:28:32 EDT
Steve, you know way better than I what needs doing - hope it's ok to
assign this bug to you in the interest of making progress.
Comment 3 Jeff Layton 2007-07-20 06:47:29 EDT
Given that AS 2.1 is now in maintenance mode, I don't see us changing this
there. Subsequent RHEL versions should be much better about this now.

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