Service rpcbind not start normally on boot in Ubuntu 16.04

root@HZ-Saturn /etc/systemd # systemctl status rpc-statd.service
● rpc-statd.service - NFS status monitor for NFSv2/3 locking.
   Loaded: loaded (/lib/systemd/system/rpc-statd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

root@HZ-Saturn ~ # journalctl /sbin/rpcbind 
-- Logs begin at Thu 2016-05-12 12:09:23 CEST, end at Thu 2016-05-12 14:54:54 CEST. --
May 12 12:16:51 HZ-Saturn rpcbind[1738]: rpcbind: xdr_/run/rpcbind/rpcbind.xdr: failed
May 12 12:16:51 HZ-Saturn rpcbind[1738]: rpcbind: xdr_/run/rpcbind/portmap.xdr: failed

If I start to manually

systemctl start rpcbind

It's working.

root@HZ-Saturn ~ # systemctl start rpcbind
root@HZ-Saturn ~ # systemctl status rpcbind
● rpcbind.service - RPC bind portmap service
   Loaded: loaded (/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled)
  Drop-In: /run/systemd/generator/rpcbind.service.d
           └─50-rpcbind-$portmap.conf
   Active: active (running) since Thu 2016-05-12 15:13:50 CEST; 2s ago
 Main PID: 1497 (rpcbind)
    Tasks: 1 (limit: 512)
   Memory: 528.0K
      CPU: 4ms
   CGroup: /system.slice/rpcbind.service
           └─1497 /sbin/rpcbind -f -w

May 12 15:13:50 HZ-Saturn systemd[1]: Starting RPC bind portmap service...
May 12 15:13:50 HZ-Saturn rpcbind[1497]: rpcbind: xdr_/run/rpcbind/rpcbind.xdr: failed
May 12 15:13:50 HZ-Saturn rpcbind[1497]: rpcbind: xdr_/run/rpcbind/portmap.xdr: failed
May 12 15:13:50 HZ-Saturn systemd[1]: Started RPC bind portmap service.

How to fix it?

It's bug systemd config rpcbind unit in Ubuntu 16. https://bugs.launchpad.net/ubuntu/+source/rpcbind/+bug/1558196

Solution:

systemctl add-wants multi-user.target rpcbind.service
  • I also had to do "systemctl add-wants multi-user.target rpcbind.service" before my ubuntu system stopped asking for a password when I tried to mount from nfs server as user. – wojci Nov 9 '16 at 20:50
  • this did not resolve the rpcbind.xdr: failed error on my Ubuntu 16.04.1 I get the same error messages in syslog but the service does start on it's own. – Antonios Hadjigeorgalis Nov 19 '16 at 16:19

The above is not a solution. As of this post Ubuntu 16.04 LTS - Xenial still has not implemented a solution. I have run this patch successfully for a month in a multi-user environment. I located the below patch from the previous posters link, but the link has since been removed.

The patch can be found here:

rpcbind patch for 0.2.3-0.2 on 16.04

As a work around, installing nfs-kernel-server will also work to fix this as the nfs-kernel-server service bridges the missing networking service dependencies.

Of course you have to be willing to have a nfs server running on the machine.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.