Bug 162133 - LOCKD_TCPPORT & LOCKD_UDPPORT don't work as expected
LOCKD_TCPPORT & LOCKD_UDPPORT don't work as expected
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: nfs-utils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
Ben Levenson
Depends On:
Blocks: 181409
  Show dependency treegraph
Reported: 2005-06-30 05:14 EDT by Ian Laurie
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0463
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 17:28:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:

Attachments (Terms of Use)
Proposed patch (603 bytes, patch)
2006-02-15 08:03 EST, Steve Dickson
no flags Details | Diff
rhel4-lockd-portset (731 bytes, patch)
2006-02-15 12:28 EST, Adam Stokes
no flags Details | Diff

  None (edit)
Description Ian Laurie 2005-06-30 05:14:46 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Red Hat/1.7.8-1.4.1

Description of problem:
Using LOCKD_TCPPORT & LOCKD_UDPPORT in /etc/sysconfig/nfs doesn't
work as expected.

File is:

When you issue "rpcinfo -p" you get:

    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100021    1   udp  32770  nlockmgr
    100021    3   udp  32770  nlockmgr
    100021    4   udp  32770  nlockmgr
    100021    1   tcp  32769  nlockmgr
    100021    3   tcp  32769  nlockmgr
    100021    4   tcp  32769  nlockmgr
    100011    1   udp   4003  rquotad
    100011    2   udp   4003  rquotad
    100011    1   tcp   4003  rquotad
    100011    2   tcp   4003  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp   4002  mountd
    100005    1   tcp   4002  mountd
    100005    2   udp   4002  mountd
    100005    2   tcp   4002  mountd
    100005    3   udp   4002  mountd
    100005    3   tcp   4002  mountd
    100024    1   udp   4000  status
    100024    1   tcp   4000  status

All the ports look OK except for nlockmgr.

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

How reproducible:

Steps to Reproduce:
1. Set /etc/sysconfig/nfs as shown above.
2. Restart system
3. Issue "rpcinfo -p"

Actual Results:  nlockmgr is shown using the wrong ports.

Expected Results:  nlockmgr should be shown using port 4001.

Additional info:

Using the commands:

  /sbin/sysctl fs.nfs.nlm_tcpport
  /sbin/sysctl fs.nfs.nlm_udpport

Results in:

  fs.nfs.nlm_tcpport = 4001
  fs.nfs.nlm_udpport = 4001

Yet "rpcinfo -p" shows the wrong ports.
Comment 1 Steve Dickson 2006-02-03 09:56:27 EST
Well just because you ask for those ports, there is no
guarantee the services will be able to bind to those exact
ports since there might already taken by another process.
Meaning there is no way to reserver those ports prior to
actually bind to them.....

I thought about failing the server if the requested port
was not available, but I figured that may not be such a 
good idea... 

BTW, what nfs-utils version are you using (i.e. what
does 'rpm -q nfs-utils' say)
Comment 5 Steve Dickson 2006-02-15 08:03:56 EST
Created attachment 124674 [details]
Proposed patch

I believe I found the problem. The reason the lockd ports are not
being set is because the nfslock initscript is not setting them... So here
is a patch that should take care of the problem. Please let me know
one way or the other...
Comment 6 Adam Stokes 2006-02-15 12:28:05 EST
Created attachment 124696 [details]
Comment 9 Ian Laurie 2006-04-09 03:59:52 EDT
I have applied the patch in comment #5 to /etc/rc.d/nfslock and it works.

Previously I got around the problem by doing it the old way with the line:

  options lockd nlm_udpport=4001 nlm_tcpport=4001 

added to the modprobe.conf file.

I notice that the nfslock file in FC5 probably needs this patch also.
Comment 10 Ian Laurie 2006-04-16 21:48:53 EDT
I can confirm that the RHEL4 patch in comment #5 fixes FC5 also.

I have created a bug report against FC5, bug 189101

Comment 11 Steve Dickson 2006-05-02 12:57:05 EDT
fixed in nfs-utils-1.0.6-69
Comment 15 Red Hat Bugzilla 2006-08-10 17:28:28 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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