# nfs can't start: rpc.mountd: svc_tli_create could not ...

## jody

Hi 

I just did a new install (2.6.38-r6) for x86_64.

I have rebooted and emerged nfs-utils (1.2.3-r1).

But when i start nfs i get strange errors:

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

 * Starting NFS mountd ...

rpc.mountd: svc_tli_create: could not open connection for udp6

rpc.mountd: svc_tli_create: could not open connection for tcp6

rpc.mountd: svc_tli_create: could not open connection for udp6

rpc.mountd: svc_tli_create: could not open connection for tcp6

rpc.mountd: svc_tli_create: could not open connection for udp6

rpc.mountd: svc_tli_create: could not open connection for tcp6                                                                                                       [ !! ]

 * Starting NFS daemon ...

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

rpc.nfsd: unable to create inet6 TCP socket: errno 97 (Address family not supported by protocol)

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

 * Starting NFS smnotify ...                                                                                                                                         [ ok ]

 * ERROR: nfs failed to start

```

rpc.statd can't start as well, but doesn't give a reason:

```
 ~ # /etc/init.d/rpc.statd start

 * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                                                                                                              [ !! ]

 * ERROR: rpc.statd failed to start

```

Can anybody help me to get my nfs running?

Thank You

  Jody

----------

## cach0rr0

is ipv6 enabled in the kernel? 

did you build nfs-utils with ipv6 support? Try doing so without ipv6 support (add -ipv6 to your USE flags in make.conf, and rebuild)

----------

## jody

Hi cach0rr0

(i didn't recognize you at first because of the different picture)

Thank You for your reply.

I reemerged nfs-utils with '-ipv6' in my make.conf's USE.

This has changed something, but there is still a problem:

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

 * 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 also rebuilt the kernel because this has once worked for me with this problem,

but now it didn't help.

And for rpc.statd the behavior is still the same as above (failing without a reason)

Do You have another idea?

Thank You

  Jody

----------

## cach0rr0

'tis now failing for a different reason - rather, what we're seeing now is the same end result, but with different symptoms and a different root cause. 

before it was failing, presumably, because nfs userspace stuff was built with ipv6 support, and trying to bind to ipv6 addresses, but alas none existed

now it's failing because it cant connect to the portmap (?) service. 

Do you have rpcbind installed? If so, try /etc/init.d/rpcbind start, and see if you can start nfs. 

if not, see if there are a half dozen rpc.* services in /etc/init.d, and try starting them up, THEN starting up nfs.

----------

## jody

Thanks cach0rr0

There was a rpcbind which i could start,

and after that nfs started without complaints.

Would it suffice to do "rc-update add rpcbind default" ?

Or do i have to make sure in some way that rpcbind is started *before* nfs at booting time?

Have therre been some changes involved in NFS et al?

I think remembering that before i could simply start nfs and it would start all other services it needed...

Thank You

  Jody

----------

## jody

Follow-Up:

I did 

```
~ # rc-update add rpcbind default

 * service rpcbind added to runlevel default

~ # rc-update add nfs default

 * service nfs added to runlevel default

~ # rc-update -s | grep -e nfs -e rpcbind     

                  nfs | default                      

              rpcbind | default                    

```

But when i rebooted the server, none of the two was running.

I found no message at all about nfs or rpcbind in dmesg:

```
~ # dmesg | grep nfs     

[    0.511249] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

~ # dmesg | grep rpcbind

~ #

```

But manually i could start both of them (rpcbind, then nfs).

So i guess i still am missing something...

Thank You

  jody

----------

## doublehp

Same message, different reason:

```
uranus ~ # /etc/init.d/nfs restart

 * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                                     [ !! ]

 * ERROR: rpc.statd failed to start

 * ERROR: cannot start nfs as rpc.statd would not start

uranus ~ #
```

```
uranus ~ # /etc/init.d/rpc.statd start

 * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                                           [ !! ]

 * ERROR: rpc.statd failed to start

uranus ~ # 
```

```
uranus ~ # ps aux | grep rpc

root       653  0.0  0.0      0     0 ?        S    Dec16   0:00 [rpciod/0]

root       654  0.0  0.0      0     0 ?        S    Dec16   0:00 [rpciod/1]

root       655  0.0  0.0      0     0 ?        S    Dec16   0:00 [rpciod/2]

root       656  0.0  0.0      0     0 ?        S    Dec16   0:00 [rpciod/3]

root      2140  0.0  0.0      0     0 ?        S    Dec16   0:00 [krxrpcd/0]

root      2141  0.0  0.0      0     0 ?        S    Dec16   0:00 [krxrpcd/1]

root      2142  0.0  0.0      0     0 ?        S    Dec16   0:00 [krxrpcd/2]

root      2143  0.0  0.0      0     0 ?        S    Dec16   0:00 [krxrpcd/3]

root     18205  0.0  0.0  10560   832 pts/3    S+   01:10   0:00 grep --colour=auto rpc

uranus ~ # 

uranus ~ # kill 653

uranus ~ # kill 653

uranus ~ # kill -9 653

uranus ~ # kill -9 653

uranus ~ # kill -9 653

uranus ~ # kill -9 2140

uranus ~ # kill -9 2140

uranus ~ # kill -9 2140

```

I always get them start normally at boot time; but I am never able to restart them. I understand that during the stop, they don't really die. And obviously, they are quiet ... unsensible to kill -9

----------

## _______0

do you have dmesg logs?

----------

## doublehp

So ... he is asking for more logs. I had to this last, just before bed time, cause it's donna kill my machine  :Very Happy: 

```
uranus ~ # /etc/init.d/rpc.statd stop  

 * Stopping NFS mountd ...                                                                              [ ok ]

 * Stopping NFS daemon ...                                                                                 [ ok ]

 * Unexporting NFS directories ...                                                                       [ ok ]

 * Stopping NFS statd ...                                                                                   [ ok ]

uranus ~ # /etc/init.d/rpc.statd start 

 * Starting NFS statd ...                                                                                   [ ok ]

uranus ~ # 

```

oh ... arg :/

back to what I did first time.

```
uranus ~ # /etc/init.d/nfs restart 

 * Exporting NFS directories ...                                                           [ ok ]

 * Starting NFS mountd ...                                                                     [ ok ]

 * Starting NFS daemon ...                                                                     [ ok ]

 * Starting NFS smnotify ...                                                                   [ ok ]

uranus ~ # /etc/init.d/nfsmount restart 

 * Starting NFS sm-notify ...                                                                      [ ok ]

 * Mounting NFS filesystems ...                                                               [ ok ]

uranus ~ # /etc/init.d/portmap restart 

 * Unmounting NFS filesystems ...                                                                                                                                                                         [ ok ]

 * Stopping NFS mountd ...                                                                  [ ok ]

 * Stopping NFS daemon ...                                                                   [ ok ]

 * Unexporting NFS directories ...                                                            [ ok ]

 * Stopping NFS statd ...                                                                         [ ok ]

 * Stopping portmap ...                                                                  [ ok ]

 * Starting portmap ...                                                                      [ ok ]

uranus ~ #  * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                            [ !! ]

 * ERROR: rpc.statd failed to start

 * ERROR: cannot start nfsmount as rpc.statd would not start

 * ERROR: cannot start nfs as rpc.statd would not start

                                

uranus ~ #         
```

Better  :Smile: 

```
uranus ~ # /etc/init.d/rpc.statd start 

 * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                                  [ !! ]

 * ERROR: rpc.statd failed to start

uranus ~ # 

```

now dmesg

```
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory

NFSD: starting 90-second grace period

nfsd: last server has exited, flushing export cache

svc: failed to register lockdv1 RPC service (errno 97).

NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory

NFSD: starting 90-second grace period

nfsd: last server has exited, flushing export cache

svc: failed to register lockdv1 RPC service (errno 97).

NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory

NFSD: starting 90-second grace period

nfsd: last server has exited, flushing export cache

```

ok, so, let's wait 90s ... 

```
uranus ~ # sleep 90

uranus ~ # /etc/init.d/rpc.statd start 

 * Starting NFS statd ...

 * start-stop-daemon: failed to start `/sbin/rpc.statd'                                                              [ !! ]

 * ERROR: rpc.statd failed to start

uranus ~ # 

```

----------

