[Nix-dev] NFS patches (idmapd etc)

Rickard Nilsson rickard.nilsson at telia.com
Wed Mar 21 20:37:12 CET 2012


Den 2012-03-21 14:45:55 skrev Rickard Nilsson <rickard.nilsson at telia.com>:

> Den 2012-03-21 14:41:08 skrev Rickard Nilsson  
> <rickard.nilsson at telia.com>:
>
>> Den 2012-03-21 14:26:54 skrev Lluís Batlle i Rossell <viric at viric.name>:
>>
>>> On Wed, Mar 21, 2012 at 12:59:04PM +0100, Lluís Batlle i Rossell wrote:
>>>
>>> Rickard, can you take a look at this?
>>> http://hydra.nixos.org/build/2314811/nixlog/30/raw
>>>
>>> What do you think the errors come from?
>>> server# Mar 21 14:22:25 server rpc.statd[1989]: Version 1.2.5 starting
>>> server# Mar 21 14:22:25 server rpc.statd[1989]: Flags: TI-RPC
>>> server# Mar 21 14:22:25 server rpc.statd[1989]: Initializing NSM state
>>> server: running command: initctl status nfsd
>>> server# Mar 21 14:22:25 server rpc.statd[1989]: Running as root.  chown
>>> /var/lib/nfs to choose different user
>>> server: exit status 0
>>> server# Mar 21 14:22:25 server rpc.statd[1989]: failed to create RPC
>>> listeners,
>>> exiting
>>> server# [   11.780340] init: statd main process (1989) terminated with
>>> status 1
>>> server# [   11.822141] init: statd main process ended, respawning
>>> server# [   11.898172] fbcondecor: console 2 using theme 'default'
>>
>> It looks like portmap hasn't started. In your logs, I can't see it
>> happening, but maybe portmap is just quiet. However, I can't see much
>> network interface startup activity either, and portmap has startOn =
>> "started network-interfaces", so maybe that's the problem? Is
>> network-interfaces started?
>
> Thinking about it, both statd and idmapd do "ensure portmap" in their
> pre-start scripts, so portmap should have been started. Can we see  
> portmap
> logs somewhere?

I noticed that I had this error on my system too. statd just keeps  
restarting.

Running rpc.statd in the foreground I get this error:

$ sudo rpc.statd -Fd
rpc.statd: Version 1.2.5 starting
rpc.statd: Flags: No-Daemon Log-STDERR TI-RPC
sm-notify: Version 1.2.5 starting
sm-notify: Already notifying clients; Exiting!
rpc.statd: Local NSM state number: 3
rpc.statd: Failed to unregister program 100024, version 1
rpc.statd: Running as root.  chown /var/lib/nfs to choose different user
rpc.statd: Failed to register (statd, 1, udp)
rpc.statd: Failed to register (statd, 1, tcp)
rpc.statd: Unrecognized bind address family: inet6
rpc.statd: Unrecognized bind address family: inet6
rpc.statd: failed to create RPC listeners, exiting

After I bit of googling I found this:  
http://forum.paldo.org/index.php?action=topic&topicnr=725&pagenr=1

Apparantely this is some combination of the later nfs-utils and portmap.  
Switching to rpcbind solves the problem. That is also the reason I didn't  
see this before, because I ran rpcbind and switched back to portmap.

I've attached two patches, one for nixpkgs and one for nixos, that builds  
rpcbind and creates an upstart job for it. It also replaces the use of  
portmap in statd and idmapd. It doesn't remove portmap, but we should  
probably not keep both of them around.

   / Rickard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nixos_rpcbind.patch
Type: application/octet-stream
Size: 4783 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120321/d6b85a91/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nixpkgs_rpcbind.patch
Type: application/octet-stream
Size: 2064 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120321/d6b85a91/attachment-0003.obj 


More information about the nix-dev mailing list