I have been using haneWIN NFS Server on my Windows 7 PC for 2 years now, to stream videos to my 4 raspberry pi’s running OSMC (raspBMC prior to OSMC). The Pi’s all use wireless to connect to the network with static IPs. My Win 7 PC also has a static IP. My TP-Link Archer C9 router died last week, so I ordered a replacement TP-Link Archer C1900. I applied the exact same configuration to the router as before, however my Pi’s “hang” when attempting to connect to the NFS share. UPnP is enabled. Subnet is the same. Connectivity to the network verified and functional.
I have attempted removing the share from the saved locations on the Pi’s and re-adding, but “a connection to the server cannot be established.” I ended up setting SMB back up to get around the issue and continue streaming (children not being able to watch their videos makes for a bad time). SMB works fine, I just dislike the additional overhead on the network and it has to buffer frequently whereas NFS buffered at the beginning and would never pause while streaming after that.
I updated 2 of the Pi’s running older versions of OSMC with no change. My other 2 were up to date. No changes were made to my “server.” Below is an excerpt from grab-logs -C -A on one of my Pi’s while attempting to browse for NFS shares.
15:44:27.449 T:3026026496 NOTICE: WakeOnAccess [192.168.1.7] trigged by accessing : nfs://192.168.1.7/e/my videos/
15:44:27.576 T:3026026496 NOTICE: WakeOnAccess success exit, server already running
15:44:30.501 T:3026026496 ERROR: GetDirectory - Error getting nfs://192.168.1.7/e/my videos/
15:44:30.517 T:3026026496 ERROR: CGUIMediaWindow::GetDirectory(nfs://192.168.1.7/e/my videos/) failed
I also found this in the logs:
15:51:16.340 T:2797859824 NOTICE: WakeOnAccess [192.168.1.7] trigged by accessing : nfs://192.168.1.7/e/my videos/
15:51:16.560 T:2797859824 NOTICE: WakeOnAccess success exit, server already running
15:53:04.955 T:3026223104 NOTICE: Samba is idle. Closing the remaining connections
15:55:40.745 T:2797859824 ERROR: NFS: Failed to mount nfs share: (nfs_service failed)
15:55:40.746 T:2797859824 WARNING: Process directory ‘nfs://192.168.1.7/e/my videos/’ does not exist - skipping scan.
Again, nothing changed host or Pi side accept for the router, until I started troubleshooting. Even then, the host has remained untouched.
A special thanks to @try_OSMC for chiming in on twitter randomly, offering advice and recommending I post here.
Would also be worth posting the output of sudo showmount -e 192.168.1.7 run on OSMC too. That will show if there are NFS shares visible outside of kodi. Can you also confirm if you are mounting the NFS shares using kodi or in /etc/fstab?
This suggests that the Pi can see the shares (4 of them).
To test whether this is OSMC or kodi, you could try adding one to /etc/fstab
To do so run:
sudo mkdir /mnt/test sudo nano /etc/fstab
Add the following line to the end: 192.168.1.7:/e/my\ videos /mnt/temp/ nfs _netdev,ro,intr,noatime,rsize=32768,wsize=32768,nolock,async,proto=udp 0 0 Ctrl+O then Ctrl+X to exit.
Then sudo mount /mnt/temp`
See if you can see the contents of the share in /mnt/temp
It’s not really a Linux issue. There’s been a a bit of a mix-up in the name of your test mount point. You created a mount point called /mnt/test but the /etc/fstab entry is for /mnt/temp. Either create a new mount point or correct /etc/fstab.
As to the original problem, I have a feeling that this might be a UPnP-related issue. To confirm my hunch, you’d need to connect the Pi to the router by ethernet cable, disable WiFi, and see if the problem disappears.
It just needs a space between nfs and _netdev - it requires extra options to be workable long term but it exists purely to verify that the Windows NFS server and OSMC client can talk to each other.
Yeah, I wasn’t sure as to which options were truly needed within the fstab entry. I added the space between NFS and _netdev, plus removed the force on UDP, as I have firewall rules for TCP/UDP regarding NFS (this was working before without forcing to one protocol versus the other). Looks like it mounted up now?
It would have been nice if you had mentioned this before… Try turning the rules off and see if that helps. If it does then take a good look at your rules.
@bmillham I had the firewall turned off in initial testing, with no change. This entire config was working as is, prior to replacing the router only. No other changes were made when it broke, until troubleshooting.