# [SOLVED]nfs won't start: rpc.nfsd: writing fd to kernel fail

## jody

Hi

I just did a new gentoo installation (2.6.37-gentoo-r4)

during which i also emerged nfs-utils-1.2.3-r1.

When i first tried to start nfs, i got the following:

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

 * Mounting nfsd filesystem in /proc ...                                  [ ok ]

 * Starting NFS mountd ...                                                [ !! ]

 * Starting NFS daemon ...

rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)

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

 * Starting NFS smnotify ...                                              [ ok ]

 * ERROR: nfs failed to start

```

I reemerged nfs-utils, and now the reply is different, and less informative

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

 * Caching service dependencies ...                                       [ ok ]

 * Starting NFS statd ...                                                 [ ok ]

 * Mounting RPC pipefs ...                                                [ ok ]

 * Starting idmapd ...                                                    [ ok ]

 * Starting NFS mountd ...                                                [ !! ]

 * Starting NFS daemon ...                                                [ ok ]

 * Starting NFS smnotify ...                                              [ ok ]

 * ERROR: nfs failed to start

```

Can anybody help me to fix my nfs?

Thank You

  JodyLast edited by jody on Wed May 25, 2011 3:25 pm; edited 1 time in total

----------

## dmpogo

how are  NFS options configured in the kernel ?

----------

## jody

I rebuilt  the kernel (changing only settings for Graphics support), 

and then reemerged nfs-utils.

Now it works...  :Smile: 

Sorry for the excitement

  jody

----------

## jody

@dmpogo:

These are the NFS kernel options:

```
~ # grep NFS /usr/src/linux/.config

CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

# CONFIG_NFS_V3_ACL is not set

# CONFIG_NFS_V4 is not set

CONFIG_NFSD=m

CONFIG_NFSD_DEPRECATED=y

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V3_ACL is not set

# CONFIG_NFSD_V4 is not set

CONFIG_NFS_COMMON=y

```

Bit i didn't touch these when i rebuilt the kernel.

Jody

----------

