[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#638322: nfs-common: rpc.statd binds to udp port 631 preventing cups startup



On Fri, 2011-08-19 at 14:36 +0100, Edward Allcutt wrote:
> On Thu, 18 Aug 2011, Ben Hutchings wrote:
> > On Thu, Aug 18, 2011 at 05:39:16PM +0200, Jan Möbius wrote:
> >> sometimes rpc.statd binds to port 631 udp which is used by cups. Therefore cups is unable to bind to its port and no printers get discovered.
> >>
> >> Rebooting the system helps as rpc.statd uses another port afterwards.
> >
> > This is a fundamental problem of the bindresvport() function, and
> > not specific to rpc.statd.  Reassigning to general.
> 
> Sure, bindresvport is archaic, but workarounds already exist. In
> particular, Debian already adds /etc/bindresvport.blacklist and the
> default already contains port 631. Does the submitter have this
> file in place with the default contents?

Oh, I completely missed that.

> > The 'portreserve' package provides a kluge to avoid this, but it
> > requires other packages to register the ports that must be reserved.
> > It also won't work reliably, because insserv runs init scripts in
> > parallel and there is thus a race condition in the way services claim
> > their ports from the portreserve daemon.
> 
> That seems like a much worse kluge than the existing blacklist. Allowing
> packages to register reserved ports however seems a useful feature.
> 
> Reassign to eglibc as request for supporting /etc/bindresvport.blacklist.d ?
[...]

That seems like it would be necessary in the general case.  However, if
port 631 is already on the list then it has nothing to do with the
current bug report.

In fact, the problem seems to be that bindresvport() supports IPv4 only
and therefore libtirpc (the new SunRPC client library) does not use it
(for either IPv4 or IPv6).  glibc declares bindresvport6() for IPv6
addresses, but it doesn't appear to define it.  So it seems like we need
to:

1. Add bindresvport6() to glibc
2. Use glibc's bindresvport{,6}() in libtirpc
3. Add configuration directory for reserving more ports (not for this
bug)

Ben.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: