Kodi Community Forum

Full Version: NFS share troubleshooting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I am having trouble adding an NFS share to Kodi. My final goal is to run Kodi (Android arm version) as the client on Kindle. My server is Raspbian (Raspberry Pi)

For testing purposes I have been using my set top box (an X86 pc running Kodi)

My first assumption is that Kodi is Kodi for puposes of using NFS shares regardless of what platform I am running it on. I hope that is correct.

I do have Kodi installed successfully on the Kindle and that is working. Adding the NFS share is not. I am also not able to add the NFS share on the STB either.

My NFS share is working from the Raspberry Pi to my CentOS desktop so I assume my basic NFS config is generally correct but I did see in the forums there are some specific options needed for Kodi.

My exports file is configured as-
/media/audvid 172.30.42.0/24 *(rw,async,no_subtree_check,all_squash,insecure)

When I start the exports service on the server I am seeing this-
pi@raspberrypi ~ $ sudo /etc/init.d/nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[....] Exporting directories for NFS kernel daemon...exportfs: No options for /media/audvid 172.30.42.0/24: suggest 172.30.42.0/24(sync) to avoid warning
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "172.30.42.0/24:/media/audvid".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x

. ok
[ ok ] Starting NFS kernel daemon: nfsd mountd.

I doesn't look like anything serious that should keep it from running properly. (I guess, let me know if different)

When I use the gui in Kodi to add the NFS share I see-
"could not connect to network server"

I turned on debug from my STB and retrieved the following from the log-
jeremy@xbmchead:~/.xbmc/temp$ grep 172.30.42.20 xbmc.log | tail -n 10
09:13:26 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/
09:13:26 T:139750998161344 ERROR: CGUIMediaWindow::GetDirectory(nfs://172.30.42.20/media/audvid/) failed
09:13:52 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/
09:13:52 T:139750998161344 ERROR: CGUIDialogFileBrowser::GetDirectory(nfs://172.30.42.20/media/audvid/) failed
09:13:52 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/
09:13:52 T:139750998161344 ERROR: CGUIDialogFileBrowser::GetDirectory(nfs://172.30.42.20/media/audvid/) failed
09:14:07 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/
09:20:36 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/
09:22:49 T:139749618603776 DEBUG: NFS: Context for 172.30.42.20/media/audvid not open - get a new context.
09:22:49 T:139750998161344 ERROR: GetDirectory - Error getting nfs://172.30.42.20/media/audvid/

I also reviewed the wiki-
http://kodi.wiki/view/NFS

So in summary- NFS sharing is working from my Rasbian server to my CentOS desktop but not working from my server to any of my Kodi machines. Thoughts? Many thanks for your suggestions!


I was able to fix my problem, I changed my exports file-
/media/audvid 172.30.42.0/24(rw,async,no_subtree_check,all_squash,insecure)

I removed the * and space. Now when I restart the NFS service I get-
pi@raspberrypi / $ sudo /etc/init.d/nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[ ok ] Exporting directories for NFS kernel daemon....
[ ok ] Starting NFS kernel daemon: nfsd mountd.
pi@raspberrypi / $

I knew it had to be something simple like a space but I wasn't sure where exactly. This is the first time I have configured NFS having always used Samba before. Also, part of my challenge was knowing what a good config looks like during startup. I assumed the warnings were just that, warnings. Now that I can see a valid startup I know what to look for next time. Issue resolved!!!
Your post is a bit of a c&p mess as it seems. So is your issue solved or not?

all_squash means that all your accesses are mapped to user nobody. In the end you need to ensure that the filesystem permissions on your nfs server for this /media/audvid path are set in away that user "nobody" can access them Wink.
Ah, yes my post was a copy and paste mess. Blush I spotted the problem after closer review. Perhaps I should have replied to my own post thereby creating the solution separately from my initial postHuh Yes, my issue is resolved. Hopefully this post might be helpful to someone else. Big Grin