Kodi Community Forum

Full Version: libNFS NFS3ERR_INVAL(-22) Error on Windows & OpenELEC but works in Ubuntu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having some trouble with the integrated NFS support in the latest nightly XBMC Eden releases.

It works fine on a fresh Ubuntu 11.04 x64 install but does not work on a similar OpenELEC or Windows install. All instances are running from the same machine on the same network and using 'factory settings' version of XBMC with no configuration other than the enabling of debug logging. Nightlies tested have been from September 26th onwards (early September and onwards in the case of OpenELEC).

On all platforms my NFS server shows up in the network and the directory structure can be browsed without issue. On OpenELEC and Windows any attempt to open a file from the NFS share (videos, pictures, music etc) results in XBMC crashing and reloading. The only error in the debug log is: 'NFS: Read failed with NFS3ERR_INVAL(-22)'. In most cases I don't even get to try opening a file since it crashes trying to pre-cache thumbnails.

Debug logs:

OpenELEC_EDEN : Video Log -> http://pastebin.com/jTceJAPR
OpenELEC_EDEN : Music Log -> http://pastebin.com/E093Xg0S
OpenELEC_EDEN : Picture Log -> http://pastebin.com/7Gg6QM9Z
Ubuntu_EDEN : Video Log -> http://pastebin.com/mU1TcC9K
Ubuntu_EDEN : Music Log -> http://pastebin.com/tuCHzgq2
Ubuntu_EDEN : Picture Log -> http://pastebin.com/vxRt9BbC

My NFS server is an Ubuntu 11.04 x64 server. I have tried turning on and off NFSv4 and turning up the number of server instances etc but this made no difference. I enabled rpc debug logging but didn't see any obvious errors in the stream. I tried adding the -d and -s options to rpc.nfsd via the nfs-kernel-server default file but I never did get anything in syslog from that.

An example entry from my exports file:

/home/sray/Downloads/sabNZBd/complete 192.168.1.0/255.255.255.0(rw,async,no_subtree_check,insecure,all_squash,anonuid=1000,anongid=1000)

I understand libnfs is still not 'stable' nor is XBMC Eden for that matter, but if I am just doing something stupid or there is an easy fix for a common problem then I'd appreciate any pointers.
I'm having the same overall problems with OpenELEC/XBMC + libnfs. I'm using two Synology NASes for my file collection, and somehow libnfs (or XBMC) is allergic to thoses NASes. Which is weird, because when I install the "nfs-common" and "portmap" packages onto my Ubuntu machines (10.04 => 11.10), both NASes work just fine without errors.

Right now, where most people using the latest pre-Eden builds have no problem with libnfs (using a QNap NAS), somehow Synology works or reacts differently. I also changed one of the /etc/export files of my NASes, and changed the "insecure_locks" to "insecure". That made some progress in browsing/selecting my files in XBMC/OpenELEC, but I still cannot actually play any of the multimedia files on my NASes.
Did you ever get this working?

I am all set to use a shared music database, but wanna use a reliable file system to mount remote files (either NFS or samba) and I would prefer nfs using the internal support so I can use my atv2.
Not working as of yet, I keep trying the nightlies just in case but I had to go back to Samba shares instead.

Incidentally on my network (wired 100Mbps MoCA), NFS has a big speed boost over Samba, especially with the remote thumbnails folder. Both Samba and NFS will saturate my link happily when copying large files etc, but NFS will transfer more information due to the lower overhead. With lots of small files NFS is much much quicker than Samba, at least with my setup.

Hopefully as Eden gets closer to final the bugs in libNFS will get resolved!
I am also getting this problem. Been trying to use built in NFS support but have been having the "NFS: Failed to mount nfs share:" in my logs.

Server is FreeNAS 8.0.1 with NFS (I even tried the share options in the xbmc wiki though this is not for this problem I believe)

Client is Openelec Ion 64bit - Eden

---
For now I just put a sticker on my Media Center saying "NEVER REBOOT, ONLY SLEEP" because it usually hangs for a few minutes when booting until it randomly successfully mount the NFS share.
Same issue here:

I build a EDEN version yesterday.

ERROR: Read - Error( -22, pread call failed with "NFS: Read failed with NFS3ERR_INVAL(-22)" )

NAS Synology DS111.

Is it a Openelec or XBMC related issue? Is there any workaround for this, all of my library are in NAS, and can't watch anything since this error.
I believe this issue is directly related to this problem:

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

It appears as if the author has been trying to fix but the last update was back in early October.
Not sure if my problem is the same as others. My systems will eventually mount the NFS share after 1 to 10ish tries. But sometimes when it takes several it can be 1-5 minutes of waiting before XBMC starts (this is on OpenELEC).