16

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.

7 Answers 7

30

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
1
  • This worked for me. Just not sure: 1) Why this service just spontaneously decided not to load normally. 2) Why it will not restart on its own without performing these steps. Ultimately, I will re-deploy as I need a stable OS. For now, these commands do work in CentOS7: systemctl enable ; systemctl start ; systemctl restart
    – Luis Perez
    Commented Apr 28, 2021 at 9:37
8

It would apear that the rpcbind systemd unit files went missing:

$ find /usr/lib/systemd -name 'rpcbind*'
# no output

Reinstalling this solved the issue:

$ pacman -S rpcbind
# [...]

$ find /usr/lib/systemd -name 'rpcbind*
/usr/lib/systemd/system/rpcbind.service
/usr/lib/systemd/system/rpcbind.target
/usr/lib/systemd/system/rpcbind.socket

$ systemctl enable rpcbind
$ systemctl start rpcbind
$ systemctl restart nfs-server

Not sure how these files were missing; perhaps a FS corruption issue?

The strange thing is that nfsd was still running, but statd wasn't. After a reboot, nfsd also didn't work (because it needs rpcbind). It's almost like these files disappeared while the system was running.

Unfortunately systemd doesn't give a clear error message on these kind of errors (i.e. dependency rpcbind failed to load), which would make it miuch easier to debug :-(

1
  • Weird. I just experienced exactly the same problem (couldn't mount an NFS3 volume, systemctl start rpc-statd failed with "failed to create RPC listeners, exiting" message.) on an Arch linux system. Installing, enabling, and starting the rpcbind service solved the problem. I wonder if this was previously working as a socket rather than service, but something went wrong somewhere. I unfortunately failed to check a priori if there were any rpcbind.* files in /usr/lib/systemd directory.
    – pgoetz
    Commented Apr 27, 2016 at 17:36
1

I've come across some instances where /var/lib/nfs or /var/lib/nfs/statd has been missing, which causes certain NFS daemons to exit with an error code but without printing any message. The fix is simple, just this:

$ sudo mkdir -p /var/lib/nfs/statd

But it's a bit odd that the daemons and systemd service files don't attempt to create the directories or print any error messages about it.

1
  • I had similar problem and this works for me. I still do not know how the services do not create the directories or why the directory is deleted.
    – ftrujillo
    Commented Jul 8, 2019 at 8:13
1

I also faced this issue.

This service status should be "enabled-runtime".

Command to check the status of service

systemctl list-unit-files | grep -E 'rpc-statd.service'
rpc-statd.service                  enabled-runtime

While checking my server this service status was "static" instead of "enabled-runtime".

But we can't set this manually, the rpc daemon user must set it at startup.

So we checked the /etc/passwd file and noticed that the rpc user was missing.

After restoring the rpc user from a backup and rebooting on boot the service starting and the issue was fixed.

1

Solutions:

For my case these work:

  1. mount.nfs4 -vvvv -o nfsvers=3 192.168.9.3:/mnt/SSD128/nfs /mnt/test

  2. chmod +r /etc/netconfig
    mount.nfs -vvvv -o nfsvers=3 192.168.9.3:/mnt/SSD128/nfs /mnt/test

I was trying to mount a nfs on ac86u to rpi4b8g(Ubuntu 20.0 4LTS) with mount -t nfs -o nfsvers=3 it didn't work, but mount.nfs4 -o nfsvers=3 worked. Strange enough, my other rpi4b4g(Ubuntu 20.0 4LTS) did work with mount.nfs, thanks to KurtB's answer I found the 2nd solution.


Bad Cases:

  1. mount.nfs4 -vvvv -o nfsvers=3 192.168.9.3:/mnt/SSD128/nfs /mnt/ssd128
    This didn't work either at first, but I saw this error in logs
    May 31 21:30:41 RPI4B8G systemd[1]: mnt-ssd128.mount: Unit is bound to inactive unit dev-disk-by\x2dpartlabel-SSD128.device. Stopping, too.
    reminded me that I unplugged my 128G SSD without unmounting, so I rm /mnt/ssd128 and mkdir /mnt/test then mount to /mnt/test.

  2. Those two didn't work either:
    apt --reinstall install nfs-common rpcbind
    mount.nfs -vvvv -o nfsvers=3 192.168.9.3:/mnt/SSD128/nfs /mnt/ssd128
    Eventually I found permission on /etc/netconfig was messed up.
    ls -al /etc/netconfig
    -rw------- 1 root root 767 Dec 27 2019 /etc/netconfig
    -rw-r--r-- 1 root root

Error Log:

May 31 21:36:13 RPI4B8G systemd[1]: Starting Preprocess NFS configuration...
May 31 21:36:14 RPI4B8G systemd[1]: nfs-config.service: Succeeded.
May 31 21:36:14 RPI4B8G systemd[1]: Finished Preprocess NFS configuration.
May 31 21:36:14 RPI4B8G systemd[1]: Starting Notify NFS peers of a restart...
May 31 21:36:14 RPI4B8G systemd[1]: Starting NFS status monitor for NFSv2/3 locking....
May 31 21:36:14 RPI4B8G sm-notify[45518]: Version 1.3.3 starting
May 31 21:36:14 RPI4B8G sm-notify[45518]: Already notifying clients; Exiting!
May 31 21:36:14 RPI4B8G systemd[1]: rpc-statd-notify.service: Succeeded.
May 31 21:36:14 RPI4B8G systemd[1]: Started Notify NFS peers of a restart.
May 31 21:36:14 RPI4B8G rpc.statd[45520]: Version 1.3.3 starting
May 31 21:36:14 RPI4B8G rpc.statd[45520]: Flags: TI-RPC
May 31 21:36:15 RPI4B8G rpc.statd[45520]: Failed to access local netconfig database: Netconfig database not found
May 31 21:36:15 RPI4B8G rpc.statd[45520]: failed to create RPC listeners, exiting
May 31 21:36:15 RPI4B8G systemd[1]: rpc-statd.service: Control process exited, code=exited, status=1/FAILURE
May 31 21:36:15 RPI4B8G systemd[1]: rpc-statd.service: Failed with result 'exit-code'.
May 31 21:36:15 RPI4B8G systemd[1]: Failed to start NFS status monitor for NFSv2/3 locking..
May 31 21:36:15 RPI4B8G rpc.statd[45529]: Version 1.3.3 starting
May 31 21:36:15 RPI4B8G rpc.statd[45529]: Flags: TI-RPC
May 31 21:36:15 RPI4B8G rpc.statd[45529]: Failed to access local netconfig database: Netconfig database not found
May 31 21:36:15 RPI4B8G rpc.statd[45529]: failed to create RPC listeners, exiting
0

Similarly, I was seeing these errors:

Starting NFS status monitor for NFSv2/3 locking....
Version 1.3.3 starting
Flags: TI-RPC
Failed to access local netconfig database: Netconfig database not found
failed to create RPC listeners, exiting
rpc-statd.service: Control process exited, code=exited status=1
rpc-statd.service: Failed with result 'exit-code'.
Failed to start NFS status monitor for NFSv2/3 locking..

In my case, I'd broken permissions on /etc/netconfig which needs to be world readable (as does /etc/)

Setting the file perms to:

chmod 644 /etc/netconfig

fixed my issue.

0

This problem seems to have resurfaced, but may depend on little differences between machines. I followed all the hints as above, but no success. On a HP Compaq 8510w (also running Tumbleweed, with the same update status, machine runs an SSD) there are no issues. Server is a flawlessly working Raspberry 3B+, Debian 10 Buster (uname -r 5.4.79-v7+), it has a static IP by router-reserved IP address based on MAC-Address.
Router is Skyworth GN542VF supplied by my ISP: TRUE Thailand. All connections are made by WiFi.
Server is NOT USING on board WiFi, connecting via Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter.
On a HP Compaq 6510b with tumbleweed (uname -r 5.10.1-1-default) I could not mount nfs shares.
After days of trial and error, watching results when changing values in /etc/nfs.conf.local and /etc/sysconfig/nfs now it is working again.
I did:

  • symlink /usr/sbin/rpc-statd -> /usr/bin/@rpc-statd

then -after receiving a message "no such file or directory"- I used mulads idea:

  • sudo mkdir -p /var/lib/nfs/statd/sm
  • chmod 777 /var/lib/nfs/statd/sm

I think, that solved the problem. After creating the directory 'sm' as root and making it accessible '777' I could start rpc-statd. Then mounting was working again.


fstab on the SERVER

proc                                            /proc   proc    defaults          0       0
PARTUUID=a7ec58f8-01                            /boot   vfat    defaults          0       2
PARTUUID=a7ec58f8-02                            /       ext4   defaults,noatime  0       1
UUID=0552e778-1ac5-4373-82b1-f2b146254bbf       /pibu   ext4    defaults        0       0
UUID=9933bfcb-cfa7-4d45-9e45-5317e5cb2e02       /DATA   ext4    defaults        0       0
UUID=89186066-7f5f-4540-8fe2-85f25e9ac719       /FOTO   ext4    defaults        0       0
UUID=D79A-B0D6                                  /EXCH   vfat    defaults        0       0




/pibu     /export/pibu    none    bind  0  0
/FOTO     /export/FOTO    none    bind  0  0
/DATA     /export/DATA    none    bind  0  0
/EXCH     /export/EXCH    none    bind  0  0
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

For what reason ever showmount -e doesn't give any answer on the client. The shares are partitions of an external USB-drive. They are exported according to the standards of nfs in a directory /export on the server. Windows PC's and other Raspberries in the network are mounting /export/xyz, but when I use /export/ in fstab of the Compaq 6510b mounting fails.

fstab on the CLIENT

UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /                       btrfs  defaults             0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /var                    btrfs  subvol=/@/var        0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /usr/local              btrfs  subvol=/@/usr/local  0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /tmp                    btrfs  subvol=/@/tmp        0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /srv                    btrfs  subvol=/@/srv        0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /root                   btrfs  subvol=/@/root       0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /opt                    btrfs  subvol=/@/opt        0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /home                   btrfs  subvol=/@/home       0  0
UUID=24688c34-9cb4-405f-83b9-e1a69df6963d       /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=e4d91d8c-c768-4a25-8046-8a1a34fac7db       swap                    swap   defaults             0  0
raspi10:/FOTO                                   /FOTO                   nfs    defaults             0  0
raspi10:/DATA                                   /DATA                   nfs    defaults             0  0
raspi10:/EXCH                                   /mnt/EXCH               nfs    defaults             0  0
raspi10:/pibu                                   /mnt/pibu               nfs    defaults             0  0

[1]:
Conky pops up before the desktop is fully loaded,
showing success at boottime

3
  • Welcome Mike! It seems that you are kind of asking help through an answer, which won't work well here. You should post this as a new question and refer to this old thread as context. This way you will allow others to interact better with this issue.
    – Zip
    Commented Jan 3, 2021 at 16:41
  • Thanks for the welcome message. If my contribution looks like asking for help, either I did not write well or you may have misread it. I S O L V E D a problem that surfaced on one machine in my network. I thought the solution could be helpful for others. The problem seems to occur in some machines using Tumbleweed. Commented Jan 5, 2021 at 9:16
  • Don't worry then. The part you mention issues mounting on clients looked like you were trying to ask new things inside the answer. That not being the case, just keep the welcoming and disregard the feedback :)
    – Zip
    Commented Jan 6, 2021 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .