From nobody@FreeBSD.org  Fri Jul 28 09:20:32 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D7FBA16A4DE
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Jul 2006 09:20:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 75BBD43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Jul 2006 09:20:32 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6S9KWhR096178
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 28 Jul 2006 09:20:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6S9KW15096177;
	Fri, 28 Jul 2006 09:20:32 GMT
	(envelope-from nobody)
Message-Id: <200607280920.k6S9KW15096177@www.freebsd.org>
Date: Fri, 28 Jul 2006 09:20:32 GMT
From: Cristopher Atienza <cfatienza@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rpc.lockd conflict with cups over udp ports 631
X-Send-Pr-Version: www-2.3

>Number:         100969
>Category:       bin
>Synopsis:       [rpc.lockd] rpc.lockd conflict with cups over udp ports 631
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    matteo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 28 09:30:14 GMT 2006
>Closed-Date:    Thu Apr 12 09:12:08 GMT 2007
>Last-Modified:  Thu Apr 12 09:12:08 GMT 2007
>Originator:     Cristopher Atienza
>Release:        FreeBSD 6.1-RELEASE
>Organization:
>Environment:
FreeBSD c.decorp.com.ph 6.1-RELEASE FreeBSD 6.1-RELEASE #2: Thu Jul 27 11:15:16 PHT 2006     cfa@hp.decorp.com.ph:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
rpc.lockd uses udp ports 631 on startup before the cups daemon starts. This will cause the following error messages on /var/log/cups/error_log "StartBrowsing: Unable to bind broadcast socket - Address already in use." it will prevent the client enable to print on the server.

# sockstat |grep 631
root     cupsd      685   0  tcp4   *:631                 *:*
daemon   rpc.lockd  554   3  udp4   *:631                 *:*
root     rpc.lockd  547   3  udp4   *:631                 *:*

# cat /var/log/cups/error_log 
"StartBrowsing: Unable to bind broadcast socket - Address already in use."

I have this in my rc.conf file.
nisdomainname="argo"
nfs_client_enable="YES"         # NFS client (nfsiod)
nfs_server_enable="YES"         # This host is an NFS server (or NO).
nfs_server_flags="-u -t -n 4"   # Flags to nfsd (if enabled).
nfs_reserved_port_only="YES"    # Provide NFS only on secure port
mountd_enable="YES"             # Run mountd (or NO).
mountd_flags="-r -p 59"         # Force mountd to bind on port 59
rpc_statd_enable="YES"          # Run NFS rpc.statd needed for client/server.
rpc_lockd_enable="YES"          # Run NFS rpc.lockd needed for client/server.
rpcbind_enable="YES"            # Run the portmapper service (YES/NO).
cupsd_enable="YES"
dhcpd_enable="YES"              # dhcpd enable
apache_enable="YES"
nis_server_enable="YES"
nis_yppasswdd_enable="YES"
nis_client_enable="YES"
nfs_client_enable="YES"         # NFS client (nfsiod)
nfs_server_enable="YES"         # This host is an NFS server (or NO).
nfs_server_flags="-u -t -n 4"   # Flags to nfsd (if enabled).
nfs_reserved_port_only="YES"    # Provide NFS only on secure port
mountd_enable="YES"             # Run mountd (or NO).
mountd_flags="-r -p 59"         # Force mountd to bind on port 59
rpc_statd_enable="YES"          # Run NFS rpc.statd needed for client/server.
rpc_lockd_enable="YES"          # Run NFS rpc.lockd needed for client/server.
rpcbind_enable="YES"            # Run the portmapper service (YES/NO).
cupsd_enable="YES"
dhcpd_enable="YES"              # dhcpd enable
apache_enable="YES"
---eof---

I try to kill the rpc.locdkd daemon and restart the cupsd similar below.

option1: login as root
# killall rpc.lockd
# socket | grep 631
root     cupsd      685   0  tcp4   *:631                 *:*

# /usr/local/etc/rc.d/cupsd restart
# rpc.lockd
# sockstat | grep 631
root     cupsd      959   0  tcp4   *:631                 *:*
root     cupsd      959   2  udp4   *:631                 *:*

# sockstat | grep rpc.lockd
daemon   rpc.lockd  982   3  udp4   *:870                 *:*
daemon   rpc.lockd  982   4  tcp4   *:948                 *:*
daemon   rpc.lockd  982   5  udp6   *:869                 *:*
daemon   rpc.lockd  982   6  tcp6   *:947                 *:*
daemon   rpc.lockd  982   7  dgram  -> /var/run/logpriv
daemon   rpc.lockd  982   9  udp6   *:867                 *:*
root     rpc.lockd  981   3  udp4   *:870                 *:*
root     rpc.lockd  981   4  tcp4   *:948                 *:*
root     rpc.lockd  981   5  udp6   *:869                 *:*
root     rpc.lockd  981   6  tcp6   *:947                 *:*
root     rpc.lockd  981   7  dgram  -> /var/run/logpriv
root     rpc.lockd  981   9  udp6   *:867                 *:*

I also went to single usermode by typing "shutdown now", then exit and check the cupsd and rpc.lockd the problem disappear. But when you restart the server I still have this conflict. 

btw: I only have this error specific to this machine I don't have any error on the other servers.
>How-To-Repeat:
Rebooting my server several times woun't solve the problem as per the suggestion by Christopher Sean Hilton on FreeBSD 5.4.

http://lists.freebsd.org/pipermail/freebsd-bugs/2006-March/017662.html

Killing the rpc.lockd and restart the cuspd or going to single usermode that's the time my server works ok.
>Fix:
unknown
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: bms 
State-Changed-When: Fri Feb 9 03:57:34 UTC 2007 
State-Changed-Why:  
rpc.lockd needs a -p option added to it just like I did for mountd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 
Responsible-Changed-From-To: freebsd-bugs->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Fri Feb 9 04:04:55 UTC 2007 
Responsible-Changed-Why:  
i'll deal with this -- low hanging fruit. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 
Responsible-Changed-From-To: bms->freebsd-net 
Responsible-Changed-By: bms 
Responsible-Changed-When: Sun Mar 4 15:04:14 UTC 2007 
Responsible-Changed-Why:  
Someone else with Copious Free Time can do this -- not a priority for me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 
Responsible-Changed-From-To: freebsd-net->matteo 
Responsible-Changed-By: matteo 
Responsible-Changed-When: Sun Mar 25 20:10:23 UTC 2007 
Responsible-Changed-Why:  
I'll work on this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/100969: commit references a PR
Date: Tue,  3 Apr 2007 20:58:36 +0000 (UTC)

 matteo      2007-04-03 20:58:28 UTC
 
   FreeBSD src repository
 
   Modified files:
     usr.sbin/rpc.lockd   lockd.c rpc.lockd.8 
   Log:
   Add the "-p" option, which allows to specify a port which the daemon
   should bind to.
   
   PR:             bin/100969
   Reviewed by:    alfred@
   MFC after:      1 week
   
   Revision  Changes    Path
   1.20      +84 -7     src/usr.sbin/rpc.lockd/lockd.c
   1.17      +8 -1      src/usr.sbin/rpc.lockd/rpc.lockd.8
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->patched 
State-Changed-By: matteo 
State-Changed-When: Tue Apr 3 21:21:45 UTC 2007 
State-Changed-Why:  
A patch was committed to HEAD, I'll MFC it in a week 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/100969: commit references a PR
Date: Thu, 12 Apr 2007 07:56:23 +0000 (UTC)

 matteo      2007-04-12 07:56:16 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     usr.sbin/rpc.lockd   lockd.c rpc.lockd.8 
   Log:
   MFC:
           lockd.c rev.1.20
           rpc.lockd.8 rev.1.17
           Add the "-p" option, which allows to specify a port which the
           daemon should bind to.
   
   PR:             bin/100969
   
   Revision  Changes    Path
   1.18.8.2  +84 -7     src/usr.sbin/rpc.lockd/lockd.c
   1.16.2.1  +8 -1      src/usr.sbin/rpc.lockd/rpc.lockd.8
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: matteo 
State-Changed-When: Thu Apr 12 09:11:43 UTC 2007 
State-Changed-Why:  
Fix MFC'ed to RELENG_6 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100969 
>Unformatted:
