NFS fails to start (updater bug)

Hi,

I’ve updated an old version 4.0 system step by step to 4.3. Now NFS refuses to start. When I try to start it I get:

root@server:~# systemctl start nfs-server.service 
Job for nfs-server.service canceled.

root@server:~# systemctl status nfs-server.service 
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/nfs-kernel-server.service.d
           └─univention-nfs.conf
   Active: inactive (dead) since Sun 2018-11-25 01:05:25 CET; 6min ago
  Process: 8785 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
  Process: 8783 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 8780 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
  Process: 8765 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 8763 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
      CPU: 10ms

Nov 25 01:05:25 server systemd[1]: Starting NFS server and services...
Nov 25 01:05:25 server systemd[1]: Stopped NFS server and services.

Syslog:

Nov 25 01:15:10 server systemd[1]: rpc-svcgssd.service: Cannot add dependency job, ignoring: Unit rpc-svcgssd.service is masked.
Nov 25 01:15:10 server systemd[1]: Starting Kernel Module supporting RPCSEC_GSS...
Nov 25 01:15:10 server systemd[1]: Starting Preprocess NFS configuration...
Nov 25 01:15:10 server systemd[1]: Started Kernel Module supporting RPCSEC_GSS.
Nov 25 01:15:10 server systemd[1]: Started Preprocess NFS configuration.
Nov 25 01:15:10 server systemd[1]: Starting NFS Mount Daemon...
Nov 25 01:15:10 server systemd[1]: Starting NFSv4 ID-name mapping service...
Nov 25 01:15:10 server systemd[1]: Started NFSv4 ID-name mapping service.
Nov 25 01:15:10 server systemd[1]: Started NFS Mount Daemon.
Nov 25 01:15:10 server systemd[1]: Starting NFS server and services...
Nov 25 01:15:10 server rpc.mountd[12806]: Version 1.3.3 starting
Nov 25 01:15:10 server kernel: [ 2354.914279] NFSD: starting 90-second grace period (net ffffffffa4adbe80)
Nov 25 01:15:10 server systemd[1]: Stopped NFS server and services.
Nov 25 01:15:10 server systemd[1]: Stopping NFSv4 ID-name mapping service...
Nov 25 01:15:10 server systemd[1]: Stopping NFS Mount Daemon...
Nov 25 01:15:10 server systemd[1]: Stopped NFSv4 ID-name mapping service.
Nov 25 01:15:10 server rpc.mountd[12806]: Caught signal 15, un-registering and exiting.
Nov 25 01:15:10 server systemd[1]: Stopped NFS Mount Daemon.
Nov 25 01:15:10 server kernel: [ 2354.958233] nfsd: last server has exited, flushing export cache

It looks like NFS gets shut down immediately after startup.

I’m completely clueless … help! :grinning:

TIA

Solution:

The update process left over a an unused symlink in /etc/systemd/system/multi-user.target.wants:

 nfs-kernel-server.service -> /lib/systemd/system/nfs-kernel-server.service

Removing the symlink fixed the problem. There is an other minor bug. At NFS startup nfsdcltrack complains about not being able to create it’s database:

Nov 24 20:52:36 server systemd[1]: Starting NFS server and services...
Nov 24 20:52:36 server nfsdcltrack[977]: Failed to init database: -13
Nov 24 20:52:36 server kernel: [   24.638530] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory

The cause of this is that the folder /var/lib/nfs/nfsdcltrack is missing. This could be fixed by:

mkdir /var/lib/nfs/nfsdcltrack
Mastodon