NFS Issues
#1
Hello, I have been having trouble connecting my Kodi 15.1 Android ARM client to my NFS server. My CentOS7 client can connect to the server successfully so I am tending to believe that the problem is with my Kodi system. It would seem the server itself is generally working. I turned on the debug log in Kodi and this is what I got.

21:19:42 T:1706901464 DEBUG: NFS: Context for 192.168.1.1/media not open - get a new context.
21:19:42 T:1706901464 ERROR: NFS: Failed to mount nfs share: /media (mount/mnt call failed with "RPC error. Program is not available on 192.168.1.1")
21:19:42 T:1668123024 ERROR: static bool XFILE::CDirectory::GetDirectory(const CURL&, CFileItemList&, const XFILE::CDirectory::CHints&, bool) - Error getting nfs://192.168.1.1/media/

My server exports is configured as
/media *(rw,all_squash,insecure,no_subtree_check,sync)

My mount point and all files are set to 777 just to rule out permissions issues. (I will fix security after getting a working system).

One general question, does Kodi expect RPC over a specific port? If so, I may need to adjust. (Though I think I remember it was running on port 111) Otherwise, I can't figure out why I am getting the error. All the GUI is telling me is I can't connect to the server. I can see the server and shares but I can't browse inside the share. Many thanks in advance for your advice!!!

PS.. I almost forgot to add this- I did review the NFS settings that are needed as part of this page:
http://kodi.wiki/view/NFS#NFS_sharing_from_Linux
Reply
#2
What type of file system are you sharing out? If i recall correctly, i had issues using XFS file system for nfs, so i had to add fsid=X to my exports:

Code:
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
/export/Media 192.168.2.0/24(rw,all_squash,insecure,anonuid=1001,anongid=100,no_subtree_check,fsid=2)
/export/Data 192.168.2.0/24(rw,all_squash,insecure,anonuid=1001,anongid=100,no_subtree_check,fsid=3)

# NFSv4 - pseudo filesystem root
/export 192.168.2.0/24(ro,fsid=0,root_squash,no_subtree_check,hide)
Reply
#3
I am sharing out EXT3
Reply
#4
Is this a nfs4 Server by any chance?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
I don't *think* so but I could be wrong. My server is OpenWRT running on a little older distro (Backfire). I had posted to the OpenWRT community but received no replies there.
https://forum.openwrt.org/viewtopic.php?...74#p290974

I am following the OpenWRT wiki for NFS
http://wiki.openwrt.org/doc/howto/nfs.se...er_openwrt

There are multiple packages that can run NFS but I chose to use nfs-kernel-server as I had the best success with it in the past. If I try to use the unfs3 package instead the problems are even worse and I digress and get off topic....

One suggestion I had from a co-worker was to see if there was a client for Android that could mount the NFS share. I'll have to investigate that as well. Then I could rule out Android vs Application issues. Does anyone have any thoughts on the error log? It just seems rather generic.

I did a little more digging. If I am understanding this correctly, it looks like I can confirm that NFS v4 is turned off in the config
https://dev.openwrt.org/browser/packages...?rev=25842
CONFIGURE_ARGS += \
74 --disable-gss \
75 --disable-nfsv4 \
76 --enable-static \
77 --enable-shared

Also, both my server and client are in the same subnet 192.168.1.x/24
Reply
#6
Ensure that /media and all folders below are owned by the anonym user id (or if you want to have a special nfs user you should give an "anonuid" in your exports line based on the nfs wiki entry.

I formyself have a dedicated nas user and set anonuid of all my nfs shares to this uid and then i shown all exported dirs/files to this uid. With this all accesses from outside are mapped to this user.

Also read this

https://github.com/sahlberg/libnfs/issues/77

Especially the comment of sahlberg ... we are using libnfs 1.9.6 in isengard 15.1...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#7
Thanks Memphiz
I'll try setting the /media folder to be owned by anonymous and report back tonight.

I'll also double check to be sure the mount daemon is running per the sahlberg comments. I guess I'll have to root my device so I can run a shell (not a big deal, I'm tired of the Amazon Fire OS anyway)

Hopefully, just setting the folder ownership to anonymous will be enough. Stay tuned....
Reply
#8
Hi, I've got the same problem:
Code:
NFS: Failed to mount nfs share: /media/hdd (mount/mnt call failed with "RPC error. Program is not available on 192.168.1.145")

The most strange thing in my case is that this problem happens in kodi 15.2 in an openelec image in a raspberry pi, but if I try to mount it via ssh (mount 192.168.1.145:/media/hdd /mylocalfolder), it does it perfectly in no time.

And to make things stranger, I've also got a kodi 15.2 installed in a windows 10 PC, and there the NFS connection goes smooth.

I've also got a synology NAS that can't mount the remote folder, so at this time I don't know if the problem is in the clients or in the server.
Reply

Logout Mark Read Team Forum Stats Members Help
NFS Issues0