Discussion:
# systemctl start nfs.service works -- # systemctl enable nfs.service doesn't
Jonathan Ryshpan
2014-02-10 01:55:16 UTC
Permalink
Setting up an nfs server on a laptop running Fedora-20, I get the
following perplexing results:

# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory

Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?

Thanks - jon
poma
2014-02-10 02:14:48 UTC
Permalink
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
:)

$ ll /usr/lib/systemd/system/nfs.service

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

$ rpm -ql nfs-utils | grep server.service
/usr/lib/systemd/system/nfs-secure-server.service
/usr/lib/systemd/system/nfs-server.service


poma
Ed Greshko
2014-02-10 02:28:35 UTC
Permalink
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
nfs service working just fine here on F20.

After you reboot, what is the output of

systemctl status nfs.service

FWIW, there may be a "bug" when using the name nfs.service (which is a symlink) when enabling an enabled service.
--
Getting tired of non-Fedora discussions and self-serving posts
Jonathan Ryshpan
2014-02-11 22:20:14 UTC
Permalink
Post by Ed Greshko
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
nfs service working just fine here on F20.
After you reboot, what is the output of
systemctl status nfs.service
FWIW, there may be a "bug" when using the name nfs.service (which is a symlink) when enabling an enabled service.
A very good question. I should have followed it earlier.
For more see below.
Post by Ed Greshko
Post by Jonathan Ryshpan
What's going on? How can I fix it
One other thing....
You say you're using a laptop. Possibly you are also using DHCP to
get your IP addresses....
In that case you should also make sure that....
NetworkManager-wait-online.service is enabled.
As often happens, Ed has got to the root of the problem. The last line
of the transcript is the important one.:

# systemctl status nfs.service
nfs-server.service - NFS Server
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)
Active: failed (Result: exit-code) since Tue 2014-02-11 13:36:33 PST; 1min 27s ago
Process: 1316 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
Process: 1313 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)

Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain systemd[1]: nfs-server.service: control process exited, code=exited status=1
Feb 11 13:36:33 localhost.localdomain systemd[1]: Failed to start NFS Server.
Feb 11 13:36:33 localhost.localdomain systemd[1]: Unit nfs-server.service entered failed state.

# systemctl start nfs-server.service

# systemctl status nfs-server.service
nfs-server.service - NFS Server
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)
Active: active (exited) since Tue 2014-02-11 13:46:00 PST; 17s ago
Process: 1525 ExecStartPost=/usr/libexec/nfs-utils/scripts/nfs-server.postconfig (code=exited, status=0/SUCCESS)
Process: 1510 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT (code=exited, status=0/SUCCESS)
Process: 1507 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 1504 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)
Main PID: 1510 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nfs-server.service

Feb 11 13:46:00 localhost.localdomain systemd[1]: Starting NFS Server...
Feb 11 13:46:00 localhost.localdomain systemd[1]: Started NFS Server.

# systemctl enable NetworkManager-wait-online.service #<Fixes the problem; nfs starts at boot time.>
James Hogarth
2014-02-13 11:11:48 UTC
Permalink
Post by Jonathan Ryshpan
As often happens, Ed has got to the root of the problem. The last line
# systemctl status nfs.service
nfs-server.service - NFS Server
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)
Active: failed (Result: exit-code) since Tue 2014-02-11 13:36:33 PST; 1min 27s ago
Process: 1316 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
Process: 1313
ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig
(code=exited, status=0/SUCCESS)
Post by Jonathan Ryshpan
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
Feb 11 13:36:33 localhost.localdomain exportfs[1316]: exportfs: Failed to resolve amito
control process exited, code=exited status=1
Post by Jonathan Ryshpan
Feb 11 13:36:33 localhost.localdomain systemd[1]: Failed to start NFS Server.
Feb 11 13:36:33 localhost.localdomain systemd[1]: Unit nfs-server.service
entered failed state.
Post by Jonathan Ryshpan
# systemctl start nfs-server.service
# systemctl status nfs-server.service
nfs-server.service - NFS Server
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled)
Active: active (exited) since Tue 2014-02-11 13:46:00 PST; 17s ago
Process: 1525
ExecStartPost=/usr/libexec/nfs-utils/scripts/nfs-server.postconfig
(code=exited, status=0/SUCCESS)
Post by Jonathan Ryshpan
Process: 1510 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT
(code=exited, status=0/SUCCESS)
Post by Jonathan Ryshpan
Process: 1507 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 1504
ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-server.preconfig
(code=exited, status=0/SUCCESS)
Post by Jonathan Ryshpan
Main PID: 1510 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nfs-server.service
Feb 11 13:46:00 localhost.localdomain systemd[1]: Starting NFS Server...
Feb 11 13:46:00 localhost.localdomain systemd[1]: Started NFS Server.
# systemctl enable NetworkManager-wait-online.service #<Fixes the
problem; nfs starts at boot time.>
With all this discussion of NFS and systemd you may find this lwn article
interesting...

https://lwn.net/Articles/584175/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20140213/346098f4/attachment.html>
Jonathan Ryshpan
2014-02-10 02:35:54 UTC
Permalink
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
It seems nfs.service is a symlink to nfs-server.service, and
systemctl enable
doesn't work for symlinks. I regard this as a trap for the unwary,
almost a bug.

jon
Ian Pilcher
2014-02-10 18:03:03 UTC
Permalink
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
Unless things have changed since F19, you also need to enable
nfs.target.
--
========================================================================
Ian Pilcher arequipeno at gmail.com
Sent from the cloud -- where it's already tomorrow
========================================================================
Jonathan Ryshpan
2014-02-10 21:54:11 UTC
Permalink
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
I had thought that enabling nfs-server.service to which nfs.server is
linked would enable nfs.server; but it doesn't seem to. Here's the
latest:
# ll /usr/lib/systemd/system/nfs.service
lrwxrwxrwx. 1 root root 18 Feb 1
18:54 /usr/lib/systemd/system/nfs.service -> nfs-server.service
# systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service enabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled <====
nfs.service disabled <====
nfslock.service disabled
nfs.target enabled
And in fact nfs networking doesn't work till I invoke:
# systemctl start nfs.service
(Note that nfs.target is enabled.)

What's going on? How can I fix it

jon
Ed Greshko
2014-02-10 22:02:45 UTC
Permalink
Post by Jonathan Ryshpan
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
I had thought that enabling nfs-server.service to which nfs.server is
linked would enable nfs.server; but it doesn't seem to. Here's the
# ll /usr/lib/systemd/system/nfs.service
lrwxrwxrwx. 1 root root 18 Feb 1
18:54 /usr/lib/systemd/system/nfs.service -> nfs-server.service
# systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service enabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled <====
nfs.service disabled <====
nfslock.service disabled
nfs.target enabled
# systemctl start nfs.service
(Note that nfs.target is enabled.)
What's going on? How can I fix it
In answer to "What is going on".... Yesterday I asked if you have the output of

systemctl status nfs-server.service

*before* you started it manually.
--
Getting tired of non-Fedora discussions and self-serving posts
Robert P. J. Day
2014-02-10 22:20:11 UTC
Permalink
Post by Ed Greshko
Post by Jonathan Ryshpan
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
I had thought that enabling nfs-server.service to which nfs.server is
linked would enable nfs.server; but it doesn't seem to. Here's the
# ll /usr/lib/systemd/system/nfs.service
lrwxrwxrwx. 1 root root 18 Feb 1
18:54 /usr/lib/systemd/system/nfs.service -> nfs-server.service
# systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service enabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled <====
nfs.service disabled <====
nfslock.service disabled
nfs.target enabled
# systemctl start nfs.service
(Note that nfs.target is enabled.)
What's going on? How can I fix it
In answer to "What is going on".... Yesterday I asked if you have the output of
systemctl status nfs-server.service
*before* you started it manually.
hmmmmm ... i can vouch that i'm getting the same thing on my f20
system. manually starting and stopping seems to work fine, but the
"enable" operation generates what the OP reported. odd ...

[root at localhost rpjday]# systemctl disable nfs
[root at localhost rpjday]# systemctl enable nfs
Failed to issue method call: No such file or directory
[root at localhost rpjday]# systemctl start nfs
[root at localhost rpjday]# showmount -e
Export list for localhost.localdomain:
... snip correct output here ...
#

so, yes, start and stop seem fine, but enable isn't working well.

rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
]
Ed Greshko
2014-02-10 22:33:51 UTC
Permalink
Post by Robert P. J. Day
Post by Ed Greshko
Post by Jonathan Ryshpan
Post by Jonathan Ryshpan
Setting up an nfs server on a laptop running Fedora-20, I get the
# systemctl start nfs.service
# systemctl enable nfs.service
Failed to issue method call: No such file or directory
Sure enough, as promised, nfs works up to the next reboot, then it stops
working. Is the system missing a module? Or what?
I had thought that enabling nfs-server.service to which nfs.server is
linked would enable nfs.server; but it doesn't seem to. Here's the
# ll /usr/lib/systemd/system/nfs.service
lrwxrwxrwx. 1 root root 18 Feb 1
18:54 /usr/lib/systemd/system/nfs.service -> nfs-server.service
# systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service enabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled <====
nfs.service disabled <====
nfslock.service disabled
nfs.target enabled
# systemctl start nfs.service
(Note that nfs.target is enabled.)
What's going on? How can I fix it
In answer to "What is going on".... Yesterday I asked if you have the output of
systemctl status nfs-server.service
*before* you started it manually.
hmmmmm ... i can vouch that i'm getting the same thing on my f20
system. manually starting and stopping seems to work fine, but the
"enable" operation generates what the OP reported. odd ...
[root at localhost rpjday]# systemctl disable nfs
[root at localhost rpjday]# systemctl enable nfs
Failed to issue method call: No such file or directory
[root at localhost rpjday]# systemctl start nfs
[root at localhost rpjday]# showmount -e
... snip correct output here ...
#
so, yes, start and stop seem fine, but enable isn't working well.
All well and good..... And yes, the same is true here.... BUT, I need not manually start the NFS server after a reboot. I comes up just fine and a remote system can mount the exported file systems. Unlike what the OP and you seem to have in common.

Sooooo...... What is the output of "systemctl status nfs-server.service" *after* a reboot and before you manually start it.... And second..... Do you have "NetworkManager-wait-online.service" enabled. If not, does enabling it make a difference?
--
Getting tired of non-Fedora discussions and self-serving posts
poma
2014-02-11 09:22:55 UTC
Permalink
FTR

https://bugzilla.redhat.com/show_bug.cgi?id=1051052

$ rpm -q --changelog nfs-utils | grep nfs.target
- Added Also=nfs.target to nfs-service file. (bz 1047972)
- Make sure nfs.target is enabled (bz 970595)

https://bugzilla.redhat.com/show_bug.cgi?id=970595
https://bugzilla.redhat.com/show_bug.cgi?id=1047972


poma
Ed Greshko
2014-02-10 22:08:47 UTC
Permalink
Oh....and FYI....

[egreshko at f20f ~]$ systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service disabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled
nfs.service disabled
nfslock.service disabled
nfs.target enabled
Chris Murphy
2014-02-11 18:39:27 UTC
Permalink
Post by Ed Greshko
Oh....and FYI....
[egreshko at f20f ~]$ systemctl list-unit-files | grep nfs
proc-fs-nfsd.mount static
var-lib-nfs-rpc_pipefs.mount static
nfs-blkmap.service disabled
nfs-idmap.service disabled
nfs-lock.service enabled
nfs-mountd.service disabled
nfs-rquotad.service disabled
nfs-secure-server.service disabled
nfs-secure.service disabled
nfs-server.service enabled
nfs.service disabled
nfslock.service disabled
nfs.target enabled
This is annoying. nfs.service is disabled, nfs-server.service is enabled, and NFS is working?

And nfs-lock.service and nfslock.service.

Are there superfluous service files causing this?

I thought a separate mount and lock daemon aren't needed in NFSv4.


Chris Murphy
Ed Greshko
2014-02-10 22:14:05 UTC
Permalink
Post by Jonathan Ryshpan
What's going on? How can I fix it
One other thing....

You say you're using a laptop. Possibly you are also using DHCP to get your IP addresses....

In that case you should also make sure that....

NetworkManager-wait-online.service is enabled.
--
Getting tired of non-Fedora discussions and self-serving posts
Loading...