From owner-freebsd-stable@FreeBSD.ORG Thu Feb 17 03:29:00 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D879106566B for ; Thu, 17 Feb 2011 03:29:00 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD088FC15 for ; Thu, 17 Feb 2011 03:28:59 +0000 (UTC) Received: from omta13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by qmta10.emeryville.ca.mail.comcast.net with comcast id 8rRn1g00617UAYkAArUzNY; Thu, 17 Feb 2011 03:28:59 +0000 Received: from koitsu.dyndns.org ([98.248.33.18]) by omta13.emeryville.ca.mail.comcast.net with comcast id 8rUy1g00A0PUQVN8ZrUy3f; Thu, 17 Feb 2011 03:28:59 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 2661A9B422; Wed, 16 Feb 2011 19:28:58 -0800 (PST) Date: Wed, 16 Feb 2011 19:28:58 -0800 From: Jeremy Chadwick To: Michael Proto Message-ID: <20110217032858.GA17686@icarus.home.lan> References: <201102091420.p19EKJ5u001268@m5p.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: george+freebsd@m5p.com, freebsd-stable@freebsd.org Subject: Re: statd/lockd startup failure X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 03:29:00 -0000 On Wed, Feb 16, 2011 at 09:46:37PM -0500, Michael Proto wrote: > On Wed, Feb 9, 2011 at 9:20 AM, wrote: > > Under 8.2-PRERELEASE (GENERIC kernel), about 15% of the times I boot up > > (with rpc.statd and rpc.lockd enabled in rc.conf), I get: > > > > Feb  4 07:31:11 wonderland rpc.statd: bindresvport_sa: Address already in use > > Feb  4 07:31:11 wonderland root: /etc/rc: WARNING: failed to start statd > > > > and slightly later: > > > > Feb  4 07:31:36 wonderland kernel: NLM: unexpected error contacting NSM, stat=5, errno=35 > > > > I can start rpc.statd and rpc.lockd manually at this point (and I have to > > start them to run firefox and mail with my NFS-mounted home directory and > > mail spool).  But what might cause the above errors?   -- George Mitchell > > > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > > > Don't rpc.statd and lockd try to choose a random port upon startup? I > seem to remember a similar problem I had a long time ago. I opted to > use a consistent, not-used port and haven't seen the problem since > (this was years ago, so I can't remember if the error you're seeing > was identical to mine). > > /etc/rc.conf: > rpc_statd_flags="-p 898" > rpc_lockd_flags="-p 4045" Yes, this is correct. The NLM error is probably related to the previous errors (possibly due to firewall rule entries, or something that already had bound the port). Some RPC services can be bound to a random port number by default, and on occasion during a reboot two things will try to map to the same port number. It's very annoying when it happens. Running "rpcinfo" on the machine can help determine what's bound to what. Locking down the port numbers as you showed is the best choice, plus allows for proper firewall rules to be added. However, be aware not all daemons support this. Reliable firewall rules for NFS = good luck. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |