# nfs-utils update - now get rpc error [SOLVED]

## binro

I just did an update world and nfs-utils got upgraded and the nfs stuff seemed to change. Now when I try to do an nfs mount from another machine, I get:

mount.nfs: mount to NFS server 'opal:/mnt/usbhd' failed: RPC Error: Program not registered

On the nfs server I have netmount, nfs, nfsmount, rpcbind, rpc.idmapd, rpc.pipefs, rpc.statd running. Portmap seems to have gone in the upgrade. I noticed that when I start rpcbind I get:

Aug  7 13:22:56 opal rpcbind: cannot bind * on udp: Address already in use

Aug  7 13:22:56 opal rpcbind: cannot bind tcp: Address already in use

rpcinfo on the server shows me:

# rpcinfo

   program version netid     address                service    owner

    100000    4    tcp6      ::.0.111               portmapper superuser

    100000    3    tcp6      ::.0.111               portmapper superuser

    100000    4    udp6      ::.0.111               portmapper superuser

    100000    3    udp6      ::.0.111               portmapper superuser

    100000    4    local     /var/run/rpcbind.sock  portmapper superuser

    100000    3    local     /var/run/rpcbind.sock  portmapper superuser

    100024    1    udp       0.0.0.0.138.140        status     superuser

    100024    1    tcp       0.0.0.0.221.65         status     superuser

    100005    1    udp       0.0.0.0.216.53         mountd     superuser

    100005    1    tcp       0.0.0.0.230.71         mountd     superuser

    100005    2    udp       0.0.0.0.216.53         mountd     superuser

    100005    2    tcp       0.0.0.0.230.71         mountd     superuser

    100005    3    udp       0.0.0.0.216.53         mountd     superuser

    100005    3    tcp       0.0.0.0.230.71         mountd     superuser

Any idea what the problem might be? The client has not been updated for some time.

----------

## binro

Some more info. After searching I tried:

opal robin # rpcinfo -u opal mountd 3

rpcinfo: RPC: Program not registered

program 100005 version 3 is not available

opal robin # rpcinfo -u opal mountd 2

rpcinfo: RPC: Program not registered

program 100005 version 2 is not available

opal robin # rpcinfo -u opal mountd 1

rpcinfo: RPC: Program not registered

program 100005 version 1 is not available

So what service should be providing mountd?

----------

## depontius

What versions of nfs-utils, etc, are you running?

----------

## binro

 *depontius wrote:*   

> What versions of nfs-utils, etc, are you running?

 

The latest, wherein lies the problem, no doubt. nfs-utils-1.2.0, libnfsidmap-0.21-r1, rpcbind-0.2.0. This was solid for years before this update.

----------

## binro

OK, I have crystallised it now. Comparing current and updated systems, I see:

# rpcinfo -p agate

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  37281  status

    100024    1   tcp  48833  status

    100005    1   udp  42319  mountd

    100005    1   tcp  58191  mountd

    100005    2   udp  42319  mountd

    100005    2   tcp  58191  mountd

    100005    3   udp  42319  mountd

    100005    3   tcp  58191  mountd

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100003    4   udp   2049  nfs

    100021    1   udp  37844  nlockmgr

    100021    3   udp  37844  nlockmgr

    100021    4   udp  37844  nlockmgr

    100021    1   tcp  55144  nlockmgr

    100021    3   tcp  55144  nlockmgr

    100021    4   tcp  55144  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100003    4   tcp   2049  nfs

and

rpcinfo -p opal

   program vers proto   port  service

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  47239  status

    100024    1   tcp  40848  status

    900101    1   udp    872

    900101    1   tcp    874

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100003    4   udp   2049  nfs

    100021    1   udp  35337  nlockmgr

    100021    3   udp  35337  nlockmgr

    100021    4   udp  35337  nlockmgr

    100021    1   tcp  59113  nlockmgr

    100021    3   tcp  59113  nlockmgr

    100021    4   tcp  59113  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100003    4   tcp   2049  nfs

opal, the updated system, is lacking the mountd service.

HTH

----------

## Bircoph

This is stange. I also have rpcbind-0.2.0 and nfs-utils-1.2.0.

# rc-config start nfs

starts mountd as well. Everything works ok.

Have you messed with init.d script?

----------

## depontius

Have you tried restarting nfs?

I had a little while on my server where things wouldn't start correctly the first time.  I added a restart in local, and all was well.  I didn't look into it too hard, once I had a workaround, and I believe that the problem has since disappeared.

My particular problems were with rpc.idmapd, though.  (pipefs didn't show up, first try)

----------

## binro

Yes, I restarted nfs many times. rpc.mountd is running, it is just not registered. 

OK, I solved the problem, the clue is the rpcbind bind failure message listed below. The function of the old portmap daemon has been taken over by rpcbind. When you do the update, emerge stops and removes the portmap script and installs rpcbind. The problem was /sbin/portmap was still running so rpcbind could not listen on ip4 sockets. Killing portmap solved the problem. "netstat -tap | grep rpcbind" was helpful in resolving this; "equery b /sbin/portmap" showed portmap was an orphan.

Phew, that was a bitch!   :Very Happy: 

----------

