mount.nfs: rpc.statd is not running but is required for remote locking

I got the same problem and was because the client tried to connect locally to its own rpc.

I had to add 127.0.0.1 to my /etc/hosts.allow in the client machine.

For my session copied below, those are the involved data:

  • guarra is the name of the client machine.
  • 192.168.2.53 the server (named fluor but this name is not used here).
  • /files is the exported share from the server.
  • /files/fluor is the destination to mount it on.

A shell session pre-modification:

root@guarra:/files# cat /etc/hosts.allow
rpcbind : 192.168.2.0/24
root@guarra:/files# mount 192.168.2.53:/files fluor/
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
root@guarra:/files#

I modified the file and got this:

root@guarra:/files# cat /etc/hosts.allow
rpcbind : 192.168.2.0/24 127.0.0.1
root@guarra:/files# mount 192.168.2.53:/files fluor/
root@guarra:/files#

After adding the local IP to the client, it could use it's own rpc, as you can see, the error message disappeared and I could mount the remote share properly.


systemctl start rpc-statd 

or

service rpcbind start
service nfs-common start

then your NFS mounts will work.