NFS Portmap: RPC: Program not registered
Over the past 9 months or so, this problem has been a recurring issue. It would go away only to return at a later date. It was getting to be very annoying. The crunch came this morning when I opened the XEON box in order to disconnect a noisy fan on a video card. Don’t worry, the card actually has lots of ventilation already. It has an exchaust fan right beside it (less than 4mm from the heatsink on the card.When I restarted the box, which acts both as an NFS server and an NFS client, the boot process was paused with the following message:
Mounting NFS file systemsNFS Portmap: RPC: Program not registered
I also found the following messages in /var/log/messages
on the NFS
server:
portmap[83487]: connect from 192.168.0.18 to getport(mountd): request from unauthorized host
portmap[83517]: connect from 192.168.0.18 to getport(nfs): request from unauthorized host
I mentioned this on IRC, and Unfurl suggested it was an /etc/hosts.allow
(i.e. tcpwrappers) issue. He suggested I change allow all for portmap. I did.
Rebooted the client box (as that’s the situation under which the problem occurred).
This time, the box rebooted properly and the NFS partitions were properly mounted.
Here’s what I had in /etc/hosts.allow
:
# Portmapper is used for all RPC services; protect your NFS!
# (IP addresses rather than hostnames *MUST* be used here)
portmap : 192.0.2.32/255.255.255.224 : allow
portmap : 192.0.2.96/255.255.255.224 : allow
portmap : ALL : deny
Here’s what I changed it to:
# Portmapper is used for all RPC services; protect your NFS!
# (IP addresses rather than hostnames *MUST* be used here)
portmap : 192.0.2.32/255.255.255.224 : allow
portmap : 192.0.2.96/255.255.255.224 : allow
portmap : 192.168.0.0/255.255.255.0 : allow
portmap : ALL : deny
The original problem (added on 27 June 2000)
Today after I rebooted two boxes, I found that one couldn’t remount some NFS partitions which resided on the other box. During the boot process, the following message was displayed (it is split into two lines here for readability):Mounting NFS file systemsNFS Portmap: RPC: Program not registered
This was on the client box. The server box seemed fine. I pressed control-C to allow the box to continue booting. Then I tried to mount the partitions manually:
mount /www/unixathome.org/adsl NFS Portmap: RPC: Program not registered
Following some advice, I did the following (but before you do that, see also the next section for more information):
On the server (kill the NFS daemon, restart mountd, and restartd the NFS daemon):
killall -TERM nfsd killall -hup mountd nfsd -u -t -n 4
One the client:
mount -v myserver:/nfs/path/ /local/path
where myserver is the name of the NFS server and /local/path is the mount point on the local box.
The above process worked. The mount succeeded. Life goes on.
More information (added on 15 July 2000)
Each time I reboot the NFS server, I find that the clients can’t access it. In the logs on the client, I find this:nfs server mynfsserver:/path/to/stuff: not responding
So on the server I do this:
killall -term nfsd nfsd -u -t -n 4
Soon afterwards, I find messages like this in the client:
nfs server mynfsserver:/path/to/stuff: is alive again
I also noticed that one of my mounts doesn’t mount properly. And that mountd was not running on the server. So I started it manually by issuing the command:
mountd
Then, on the client, I manually mounted the missing volumes. e.g.:
# mount -v ducky:/nfs/path /path/to/local/mount/point ducky:/nfs/path on /path/to/local/mount/point (nfs)