Client says: nfs server not responding, after wakeup from sleep
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Client says: nfs server not responding, after wakeup from sleep
Hi,
As said in the subject. After a reboot it's working. But when putting the client (laptop) to sleep and after a while waking the client, journalctl gives:
Code:
May 19 16:43:00 laptop2 kernel: nfs: server richard not responding, timed out
May 19 16:43:45 laptop2 kernel: nfs: server richard not responding, timed out
May 19 16:44:00 laptop2 kernel: nfs: server richard not responding, timed out
The server (iptables logging) receives something on port 5904 and transmits something on this port.
But the client does not connects to the server. After a reboot all is fine.
What is a way to solve this issue?
Server = Fedora 21,
Client = Fedora 20.
tcp 0 6568 laptop2.fritz.box:858 richard:nfs ESTABLISHED
tcp 0 0 laptop2.fritz.box:59449 richard:5904 ESTABLISHED
Stil on the client with journalctl:
Code:
May 20 06:14:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:15:08 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:15:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:15:58 laptop2 kernel: nfs: server richard not responding, still trying
May 20 06:16:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:16:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:17:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:17:18 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:18:13 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:18:23 laptop2 kernel: nfs: server richard not responding, timed out
May 20 06:18:34 laptop2 kernel: nfs: server richard OK
May 20 06:18:34 laptop2 kernel: nfs: server richard OK
May 20 06:18:34 laptop2 kernel: nfs: server richard OK
May 20 06:18:34 laptop2 kernel: nfs: server richard OK
Always after 15 minutes, the nfs link works.... ????
Never used sleeping NFS clients, but I can guess what happens.
Awaked client want continue with old NFS session, when NFS server already cleaned it out.
This is good for server, otherwice you will get "NFS stale handler" every time.
You can resolve this using automount/autofs on client,
what will mount/dismount NFS for you on the fly.
Never used sleeping NFS clients, but I can guess what happens.
Awaked client want continue with old NFS session, when NFS server already cleaned it out.
This is good for server, otherwice you will get "NFS stale handler" every time.
You can resolve this using automount/autofs on client,
what will mount/dismount NFS for you on the fly.
Yesterday evening I installed autofs, edited /etc/auto.misc en restarted autofs.
/etc/auto.misc:
Code:
data -rw,soft,intr richard:/home/data
A ls on /misc gives an empty dir. A ls on /misc/data gives the content of my nfs server. The automount works.
I closed the lid of my laptop (laptop is going to sleep). This morning I started it again and did "ls /misc/data", but no responese :-(
journalctl gives
Code:
May 21 06:14:29 laptop2 kernel: nfs: server richard not responding, timed out
I suppose you had checked usual staff: IP, DNS, /etc/resolv.conf, /etc/hosts, ping.
If "mount" command show you nfs4, try nfsv3.
(it is in /etc/sysconfig/autofs MOUNT_NFS_DEFAULT_PROTOCOL=3)
IP of the server is fixed.
IP of the client is fixed.
The IP of the server is listed in /etc/hosts of client
The IP of the client is listed in /etc/hosts of server
Both server and client have in /etc/resolv.conf: nameserver 192.168.1.1
Ping is working from/to client/server when the NFS is timing out.
This evening the mount did work (with autofs). I will test it again tomorrow.
Protocol is on 4. If the test tomorrow fails, I will try v3.
This morning no luck, After the laptop wakes up, nfs to my server times out.
I changes the protocol version from 4 to 3 in /etc/sysconfig/autofs MOUNT_NFS_DEFAULT_PROTOCOL=3
Still no luck with MOUNT_NFS_DEFAULT_PROTOCOL=3.
I also tried other settings (mostly timeout settings) But the 15 minutes stays.
BUT:
I always have krusader (filemanager) running.
If I shutdown krusader before setting the laptop to sleep, after wakeup the nfs mount works!
It looks like autofs cannot unmount the nfs link if krusader has a tab open of this mount.
Also Dolphin (another filemanager) gives the same problem as krusader.
So when going to sleep, the umount of autofs must be set to force (or something like that).
If the server IPtables service is shutdown (systemctl stop iptables), the delay of 15 minutes is gone and autofs connects directly.
Although there are two rules for laptop2:
Code:
$IPT -A INPUT -s $LAPTOP2 -j ACCEPT
$IPT -A OUTPUT -d $LAPTOP2 -j ACCEPT
$LAPTOP2 has the value IP address of my laptop.
I am going to search in this (iptables) direction.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.