Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455859 - rpc.rquotad grabs port 993 breaking dovecot IMAPs
Summary: rpc.rquotad grabs port 993 breaking dovecot IMAPs
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
Depends On: 223937
TreeView+ depends on / blocked
Reported: 2008-07-18 12:48 UTC by Kamil Dudka
Modified: 2016-04-06 14:54 UTC (History)
5 users (show)

Fixed In Version: setup-2.6.17-1.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-11-18 14:25:34 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 103401 None None None Never

Internal Links: 103401

Description Kamil Dudka 2008-07-18 12:48:12 UTC
Would be possible to add rquotad default port 875 to /etc/services?

Due to this absence rpc.rquotad grabs a random port at startup with default 
configuration. This random port can conflict with known services on ports 600-1023 
and causes this services (like secure IMAP) not to start.

I am working on patch for glibc/sunrpc which prevent rpc services to grab port of 
other known services, but modification of /etc/services I found as reasonable first 

+++ This bug was initially created as a clone of Bug #223937 +++

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv: 
Gecko/20061219 Fedora/ Firefox/ pango-text

Description of problem:

RPC rquotad grabs an almost random port at startup, lately on my FC5 server, it has 
been grabbing TCP/993.  This prevents dovecot secure IMAP from being able to start up 
because its port is already bound.

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

How reproducible:

Steps to Reproduce:
1. Boot as usual
2. Watch rpc.rquotad grab a random TCP port
3. Watch dovecot IMAPS fail to start

Actual Results:

Dovecot fails to start secure IMAP (IMAP over SSL) on port TCP/993

Expected Results:

IMAP/SSL server should  be running on TCP/993

Additional info:

RPC services should avoid a list of well-know ports when picking a random port to 
listen on for services that consult the portmapper.

-- Additional comment from on 2007-01-24 13:55 EST --
Yes I agree this is a pain... It happens to all the RPC daemons and 
Unfortunately there is no real easy answer... 

I wonder if added a getservbyport() to the RPC library routines to 
ensure the port is not in /etc/services would help... 

-- Additional comment from on 2007-03-19 05:08 EST --
I have the same problem here with nfs.statd and dovecot. 

-- Additional comment from on 2007-03-20 00:36 EST --
How about finding a range of 20-30 "safe" available ports around 800-900 and
having the RPC library try those first.  This would eliminate the common cases.
 Dropping a warning to syslog if it had to pick a random one would also be a
good thing.

-- Additional comment from on 2008-03-02 12:06 EST --
*** Bug 435607 has been marked as a duplicate of this bug. ***

-- Additional comment from on 2008-03-12 09:48 EST --
Changing version to RAWHIDE as FC-5 is EOL and problem still occurs. The scheme
is following - with RQUOTAD_PORT specified in /etc/sysconfig/nfs quota will try
the port and random port is chosen only if the bind on specified port fails.  

-- Additional comment from on 2008-05-13 22:33 EST --
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

-- Additional comment from on 2008-07-15 04:51 EST --
I can't reproduce this behavior. Can anybody attach /etc/sysconfig/nfs and /etc/
services of error-prone installation?

Comment 1 Phil Knirsch 2008-07-25 14:17:26 UTC
Hi Kamil.

We'll be including portreserve in Fedora 10 with which you can specifically
reserve such ports at startup, preventing exactly that behaviour.

But of course until thats done i'll just add it to /etc/services for now.

Read ya, Phil

Comment 2 Ondrej Vasik 2008-11-18 12:11:55 UTC
Built in rawhide as setup-2.7.4-2.fc11 with rquotad in /etc/services with port 875.

Comment 3 Ondrej Vasik 2008-11-18 14:25:34 UTC
Already fixed in F-9 setup-2.6.17-1.fc9 (marked there temporary - I guess it should be permanent as this is default value for rquotad in nfs package and there are less important services already listed) , closing CURRENT_RELEASE.

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