NFS problems with Kodi streaming

  • I am getting a little bit crazy, help please!
    My setup:
    HP microserver N36L, OMV4, File System Union with 4 HDD ext4, NFS export with ro,subtree_check,insecure,no_acl


    Kodi 18 (but 17 was the same) on a FireTV Stick streaming files from the NFS share.


    When I start a video, after a couple of random seconds, the video stops and I return to the selection menu. I don't touch anything on the FireTV Stick nor in Kodi, I just reboot the OMV and when it returns online, I start again the play button and the video doesn't stop anymore. Then, when I watch another video hours later, I get again the video to stop again. Another OMV reboot fixes the problem.


    I didn't have this problem in the past, I did the same settings on my FireTV Stick and on OMV. I tried to reinstall from scratch omv in a new SSD, but I get the same problem.


    I am not a linux guru, I really don't know how to troubleshoot the problem. Any help will be very much appreciated!

  • I'm having the exact same issue. Although I've noticed it seems to be with NFS clients in general and not just Kodi. I only recently upgraded (doing fresh install) to OMV4 and didn't have this problem in OMV3. I noticed it a few days ago and didn't think much of it since my other Kodi is working fine (although I don't think it's using NFS since I'm using Emby as well, but the Kodi having the issues is just using straight NFS). Last night when I ran an upgrade on my NextCloud Instance running on a remote ubuntu server was when I figured there was definitely an issue since the Nextcloud data folder is on an NFS share. During the upgrade the extraction of the downloaded Nextcloud zip file kept failing with unexpected end of file. So I copied the file directly to the folder using SFTP instead of NFS and that was fine. After that the extraction went well and the upgrade was going relatively smooth until it went to delete the old files on the NFS share. Suddenly I kept getting errors saying it couldn't delete files. I'd wait, click the retry, it would delete more, then fail. Over and over deleting a little at a time until it failed.


    I'm not sure if this is the issue or not as I've been messing around since then on my clients. I noticed the mount was using NFS3 instead of NFS4. I've since remounted everything on my network using NFS to use NFS4. Unfortunately it looks like what I use for Kodi doesn't have that capability as far as I can tell. Either way, it should still work regardless of NFS3 or NFS4.


    I'm still doing some testing but so far on NFS4 it SEEMS like it's working. Unfortunately I can't really re-run the upgrade on Nextcloud to really test it.


    In the meantime I switched my one Kodi device to SFTP and it appears to be working fine. I'd still rather use NFS for some things, Kodi being one of them.

    • Offizieller Beitrag

    I use nfs for all of my firetvs (some are sticks) running kodi 17.6 or 18.0. nfsv3 with ro,subtree_check,insecure and have no issues. I don't think the no_acl flag would cause the problem. I also don't have rpc-statd enabled.


    $ systemctl status rpc-statd
    ● rpc-statd.service - NFS status monitor for NFSv2/3 locking.
    Loaded: loaded (/lib/systemd/system/rpc-statd.service; disabled; vendor preset: enabled)
    Active: inactive (dead)


    I also have VMs from ESXi on nfs without issues. Not even sure where to look for this one.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • No clue what would be causing it. Kernel perhaps? I am running 4.19. It's what got installed when I installed OMV4. I'm far from being a linux guru. I'm learning more and more and getting better. Been forcing myself for the past 1.5 years to use linux on my primary personal laptop.


    The only things using NFS are a couple of Ubuntu systems (one mainly just for simple file access, not much going on with it. The other Nextcloud which has quite a bit of activity) and 2 Kodi systems, although one is using the Emby plugin so I believe it's actually streaming via http(s).

    • Offizieller Beitrag

    I don't think it is the kernel. I have three systems serving NFS at my house - OMV 4.x with latest backports kernel, OMV 4.x with proxmox kernel (same as Ubuntu 18 kernel), and Ubuntu 18. All nfsv3 and serving ESXi and firetvs.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Interesting. Perhaps I'll set up a couple NFS shares on my other systems and see if anything funny happens. Either way, I imagine enabling the rpc-statd service can't really hurt.


    The only other thing going on while I noticed this was my NAS was backing up to Crashplan (yeah, still using it :-/). Ever since I moved to OMV4 it's been basically reuploading all however many TB I have back to crashplan so it's been taking a CPU hit for a while. Still doesn't completely explain why it's ok with NFSv4 but not v3. I don't know. Like I said, I'm kind of a newb to Linux.

    • Offizieller Beitrag

    I imagine enabling the rpc-statd service can't really hurt.

    Nope, it doesn't hurt. I just wanted to point out that isn't the exact issue.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Well, that didn't fix the issue. Last night, same thing happened with my one Kodi client. I'll need to see if I can find anything in logs. No clue where to start looking though. I checked the syslog on OMV yesterday and didn't see anything besides the connections and when I did the unmounts. Guessing the errors will be on the clients.

    • Offizieller Beitrag

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I THINK I see what my problem is but not sure. Getting quite a few errors on the client of "NFS: Server xxx.xxx.xxx.xxx error: fileid changed".....Then proceeds to say what was expected and what it got. Obviously the xxx.xxx.xxx.xxx is the IP of my OMV server.


    I can definitely confirm though that at least when it comes to streaming a video over NFSv4, I don't have an issue. I have read in numerous Kodi forums that you're better mounting NFS via fstab over browsing/mounting via the Kodi browser using nfs:// (uses libnfs). Although there's other drawbacks to doing it this way which isn't for this forum.


    Just an idea of my configuration. All of my storage (except the system of course) is all on mergerfs/UnionFS along with snapraid. I'm not sure if this could be stemming from MergerFS, or from NFS.


    My MergerFS config is:
    Existing Path, Most Free Space
    20GB min free space
    defaults,allow_other,direct_io,use_ino,func.getattr=newest


    I forgot exactly why I have direct_io on but there was a reason. I have the last option for NextCloud because without it, I would have to force NextCloud to scan the NFS mounts via a Cron job. Just recently figured that one out.


    The exports for the most part are all rw,subtree_check,insecure except for one which is no_subtree_check. Experienced the same issue on exports with both subtree settings.


    Although...now that I think about it, this might be the NFSv4. Noticed that there's exports under # NFSv4 - pseudo filesystem root which are (ro,fsid=0,root_squash,no_subtree_check,hide).

  • added noforget but didn't seem like it fixed the issue. After the reboot I kept getting the errors regarding fileid changed. switched the subtree_check to no_subtree_check and although I'm still receiving those errors (much less frequently at least), it SEEMS like playback from Kodi via NFSv3 has got better. Tried it last night and it played through a video just fine. Haven't really had much time to check.


    It could also still be a CPU issue on the OMV server. Crashplan has been keeping the CPU around 50-75% for a while now. Been trying to get that straightened up as well but that would be for a separate thread. Seems like it doesn't like reading from /sharedfolders/ and would rather read directly from the original mount point.

    • Offizieller Beitrag

    If this is android (firetv) then is not clear that the built in libnfs comes with v4 support, probably have to dig into the Kodi build options for the apk. To access by default to v4, uri should be nfs://ip/share, v3 nfs://ip/export/share, at least this works in between Debian servers.


    In this ft sticks with android there is no option to use fstab. Libreelec in stable , busy box can’t handle nfsv4, but you can use fstab with udp options which gives an overall improvement of 20% sometimes. There are probably some custom builds that include the utils to handle nfsv4.
    Have you considered to use samba?

    • Offizieller Beitrag

    Maybe a kodi developer can answer this better, but my impression is libnfs doesn't have very good nfsv4 support, in . If you look at the 2.0 release which i think is what they use in kodi builds


    https://github.com/xbmc/xbmc/b…ds/target/libnfs/Makefile


    https://github.com/sahlberg/libnfs/releases/tag/libnfs-2.0.0


    Take a look at the changelog in 3.0 and 4.0


    https://github.com/sahlberg/libnfs/releases/tag/libnfs-3.0.0
    https://github.com/sahlberg/libnfs/releases/tag/libnfs-4.0.0

  • I've been fighting this for the past week or two as well-- SMB shares are unaffected, but streaming over my NFS (v3) shares causes disconnects for audio and video files.


    The only errors I've seen are "EOF" (end-of-file) errors which suggests that the client asks for the next bit of the file, and server says "Sorry, that's it", and I haven't found any errors in the logs on my OMV system, so I'm not seeing the same error message parading lunatic is, but I'm also running NFS v3 (over TCP to one box, and UDP to another). Both the NFS clients haven't changed software in weeks, if not months.


    Since this started when I did a full update a week or two ago, I went back and looked at the logs for what had updated, and the only package that would be likely to affect NFS service would be the linux kernel.


    I booted from the older kernel (4.19.0-0.bpo.1-amd64) instead of the current kernel (4.19.0-0.bpo.2-amd64), and I've been unable to duplicate the problem since.


    I'll update if it fails again, but so far, it's looking pretty solid.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!