Bug 732968

Summary: NFS server will not start with nfs-utils-1.2.4-6.fc16
Product: [Fedora] Fedora Reporter: Steve Dickson <steved>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: bfields, harald, jlayton, johannbg, kay, lpoetter, metherid, mschmidt, notting, plautrba, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: nfs-utils-1.2.4-8.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-09 17:12:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steve Dickson 2011-08-24 10:53:14 UTC
Description of problem:
# systemctl start nfs-server.service fails to start server:

# systemctl status nfs-server.service shows
nfs-server.service - NFS Server
	  Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled)
	  Active: failed since Wed, 24 Aug 2011 06:28:14 -0400; 20min ago
	 Process: 8054 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT} (code=exited, status=1/FAILURE)
	 Process: 8053 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
	 Process: 8051 ExecStartPre=/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS (code=exited, status=0/SUCCESS)
	 Process: 8049 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/nfs-server.service

The Error in /var/log/messages is 

rpc.nfsd[8054]: error starting threads: errno 38 (Function not implemented)

which means no thread count is being given on the command line.
Looking at that  /lib/systemd/system/nfs-server.service script:
Description=NFS Server
After=network.target rpcbind.service

ExecStartPre=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS
ExecStartPre=/usr/sbin/exportfs -r
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}
ExecStartPost=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS
ExecStop=/usr/sbin/rpc.nfsd 0
ExecStopPost=/usr/sbin/exportfs -f


The ${RPCNFSDCOUNT} is defined in the -/etc/sysconfig/nfs script as
RPCNFSDCOUNT=8 so it appears EnvironmentFile mechanize is not correctly 
defining or export variables correctly.

Comment 1 Steve Dickson 2011-08-24 15:56:35 UTC
It turns out that systemd redirects messages logged 
to stderr to /dev/null by default, which means any
and all start up error were lost. 

Once I figured that out, added 'StandardError=syslog+console' 
to all the service files which enabled me to see why rpc.nfsd 
was failing.

The problem was /proc/fs/nfsd was not being mounted
before rpc.nfsd was being started. So added the mount
to the nfs-server.preconfig file which fixed the problem.

Comment 2 Steve Dickson 2011-08-24 15:59:25 UTC
Now I'm getting the following errors:

rpc.nfsd[978]: rpc.nfsd: unable to bind inet TCP socket: errno 13 (Permission denied)
rpc.nfsd[978]: rpc.nfsd: unable to bind inet6 TCP socket: errno 13 (Permission denied)
rpc.nfsd[978]: rpc.nfsd: unable to set any sockets for nfsd

These error go away when I put SELinux in permissive mode, which
I will document in another bz...

Comment 3 J. Bruce Fields 2011-08-24 16:12:10 UTC
Is nfsd another filesystem to automount?

I guess it doesn't matter as much for rpc_pipefs as nfsd's the only user.

Comment 4 Fedora Update System 2011-08-24 20:25:33 UTC
nfs-utils-1.2.4-7.fc16 has been submitted as an update for Fedora 16.

Comment 5 Fedora Update System 2011-08-24 22:47:33 UTC
Package nfs-utils-1.2.4-7.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nfs-utils-1.2.4-7.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-08-30 21:23:30 UTC
nfs-utils-1.2.4-8.fc16 has been submitted as an update for Fedora 16.

Comment 7 Fedora Update System 2011-09-09 17:12:17 UTC
nfs-utils-1.2.4-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.