# NFS Broken With >=nfs-utils-1.2 ("Setting version failed")

## Kenji Miyamoto

I recently upgraded to nfs-utils-1.2.2-r1, and now I can't get NFS exports to work at all.  This is the output:

```
# /etc/init.d/nfs start

* Exporting NFS directories...                                                                                                                                          [ ok ]

* Starting NFS mountd...                                                                                                                                                [ !! ]

* Starting NFS daemon...

rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)

rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)

rpc.nfsd: unable to set any sockets for nfsd                                                                                                                            [ !! ]

* Starting NFS smnotify...                                                                                                                                              [ ok ]

* ERROR: nfs failed to start

# dmesg                

RPC: server localhost requires stronger authentication.

RPC: failed to contact local rpcbind server (errno 13).

# uname -a

Linux superbob 2.6.28-hardened-r9 #12 SMP Mon Mar 8 15:46:26 PST 2010 x86_64 Dual-Core AMD Opteron(tm) Processor 1214 AuthenticAMD GNU/Linux
```

```
rpc.nfsd: Checking netconfig for visible protocols.

rpc.nfsd: Enabling inet udp.

rpc.nfsd: Enabling inet tcp.

rpc.nfsd: Enabling inet6 udp.

rpc.nfsd: Enabling inet6 tcp.

rpc.nfsd: knfsd is currently down

rpc.nfsd: Writing version string to kernel: -2 +3 +4 

rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)

rpc.nfsd: Creating inet TCP socket.

rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)

rpc.nfsd: unable to set any sockets for nfsd

```

This is my /etc/exports:

```
/home   192.168.0.0/255.255.255.0(async,no_subtree_check,rw,nohide)
```

What's wrong with this configuration?  Why doesn't it work?

----------

## Kenji Miyamoto

Downgrading to 1.1.6, which uses portmapper, fixes the problem, but I need IPv6 support.  That means version 1.2 or newer.

----------

## blu3bird

You can start rpcbind with -i to disable those authentication checks.

(in /etc/conf.d/rpcbind /etc/sysconfig/rpcbind /whatever)

 *man rpcbind wrote:*   

> 
> 
>      -i      “Insecure” mode.  Allow calls to SET and UNSET from any host.  Normally rpcbind accepts these requests only from the loopback interface for security reasons.  This change is necessary for
> 
>              programs that were compiled with earlier versions of the rpc library and do not make those requests using the loopback interface.
> ...

 

Long term solution is to link your programs against a more recent rpc library.

----------

## cerise

 *blu3bird wrote:*   

> You can start rpcbind with -i to disable those authentication checks.
> 
> (in /etc/conf.d/rpcbind /etc/sysconfig/rpcbind /whatever)
> 
> Long term solution is to link your programs against a more recent rpc library.

 

I don't see the relevance of rpcbind to this problem -- the permission denied errors come from the kernel.

The equivalent of "echo 4 > /proc/fs/nfsd/portlist" is what causes the permission denied problem (the write() returns with a -1).

----------

