Linux – NFS no longer mounts: rpc-statd fails to start

arch linuxlinuxnfs

Whenever I try to start an NFS mount I get:

Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Version 1.3.2 starting
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Flags: TI-RPC
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: Running as root.  chown /var/lib/nfs to choose different user
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23582]: failed to create RPC listeners, exiting
Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: rpc-statd.service: control process exited, code=exited status=1
Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..
Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: Unit rpc-statd.service entered failed state.
Feb 12 00:02:19 martin-xps.lico.nl systemd[1]: rpc-statd.service failed.
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Version 1.3.2 starting
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Flags: TI-RPC
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: Running as root.  chown /var/lib/nfs to choose different user
Feb 12 00:02:19 martin-xps.lico.nl rpc.statd[23584]: failed to create RPC listeners, exiting

I tried to chown /var/lib/nfs to rpc, which just gives me the error minus the "Running as root" line:

Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: Version 1.3.2 starting
Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: Flags: TI-RPC
Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23773]: failed to create RPC listeners, exiting
Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: rpc-statd.service: control process exited, code=exited status=1
Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..
Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: Unit rpc-statd.service entered failed state.
Feb 12 00:05:09 martin-xps.lico.nl systemd[1]: rpc-statd.service failed.
Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: Version 1.3.2 starting
Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: Flags: TI-RPC
Feb 12 00:05:09 martin-xps.lico.nl rpc.statd[23775]: failed to create RPC listeners, exiting

I have tried to reinstall nfs-utils:

$ pacman -R nfs-utils
$ rm -r /var/lib/nfs
$ pacman -S nfs-utils 

It then re-creates the directory with the permission of the root user. I'm not even sure if this error even related to rpc.statd not starting.

I also tried to run rpc.statd -F --no-notify in my shell, but that just exits with code 1. No error, no nothing. There's no verbose or debug flag documented in the manpage.

I also tried to empty my /etc/exports, and my system is up to date (pacman -Syu). I didn't change anything, it just stopped working a few hours ago.

Note that using mount -o nolock /data works; so the rest of the NFS/rpc daemons seem to be fine.

Best Answer

Same problem here, rpc-stad failed since the last update (all my computers had the problem after the update).

To solve the problem I just enabled and started rpcbind:

sudo  systemctl enable   rpcbind.service  # for the next reboot
sudo  systemctl start    rpcbind.service   
sudo  systemctl restart  rpcbind.service
Related Question