Kodi Community Forum
NFS shares on Synology: "Could not connect to network server" - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: NFS shares on Synology: "Could not connect to network server" (/showthread.php?tid=172401)



NFS shares on Synology: "Could not connect to network server" - Massive - 2013-08-30

My log:
http://pastebin.com/bmaGfDJu

This log was from my iPhone but I'm getting the same errors with my Apple TV.

As you can see, I seem to get this error:
Code:
ERROR: GetDirectory - Error getting nfs://172.16.1.2/Movies/

My setup:
I run a Synology DS-207 which is a bit dated but still streams fine. This NAS is behind a second router in the network (172.16.1.x range) that is hooked up via it's WAN port. The Apple TV is on the main network (192.168.178.x range). It runs fine and I can stream perfectly with Samba. Only when I change 'smb' to 'nfs' in sources.xml it gives me this error:
Quote:Could not connect to network server

I get this error on both the iPhone and the ATV, and when connected to both networks. I do however want NFS to work because it stutters every once in a while with Samba.

I followed the NFS steps from the Wiki, everything is on 'insecure' as well in the exports file.
http://wiki.xbmc.org/?title=NFS#Synology

Git #:
20130317-0d373cc (March 17 2013)

I've tried some of the things on this forum, none of which worked. Most had to with the exports file. I also came across some threads about libnfs, but I couldn't really find anything that explained it well or said what I needed. Thanks.


RE: NFS shares on Synology: "Could not connect to network server" - Memphiz - 2013-08-30

Please enable System->System->Debugging and post a new log file ... (this one is useless without debugging enabled...)


RE: NFS shares on Synology: "Could not connect to network server" - Massive - 2013-08-30

(2013-08-30, 17:06)Memphiz Wrote: Please enable System->System->Debugging and post a new log file ... (this one is useless without debugging enabled...)

Okay, that was stupid. I only enabled debugging on my ATV but not on my iPhone. Will post a new log shortly. Thanks.


RE: NFS shares on Synology: "Could not connect to network server" - Massive - 2013-08-30

Edited my post with new log.


RE: NFS shares on Synology: "Could not connect to network server" - Massive - 2013-09-03

I've installed the nightly build from september 2, Git# 20130901-9d8dfd5.

I had hoped an updated libnfs would get rid of the problem but it has persisted.

Anyone that has solved this before?


RE: NFS shares on Synology: "Could not connect to network server" - pumkinut - 2013-09-03

NFS on the Synologies and XBMC seems to be hit or miss. I tried it awhile back and ended up going back to SMB because of flakiness on the Synology side.


RE: NFS shares on Synology: "Could not connect to network server" - stunt - 2013-09-03

Yeah the NFS is strange. I have a synology DS413j and never could get it to access my NFS shares from the NAS using XBMCbuntu but it works perfectly and out of the box with no configuration using OpenELEC.


RE: NFS shares on Synology: "Could not connect to network server" - HerQ - 2015-07-12

Recently had the same issue. I had it working fine using OpenELEC however Raspbmc had issues with a newly added NFS share (other shares from the same Synology worked fine).

What you need to do is edit /etc/exports on the Synology (over SSH) and be sure to set the anonid and anonuid to 0.

My /etc/exports looks as follows:

Code:
/volume4/Data *(ro,async,no_wdelay,no_root_squash,insecure,anonuid=0,anongid=0)



NFS shares on Synology: "Could not connect to network server" - Miguix - 2015-07-12

Why would u put ur nas behind a second router? Does it stream over nfs in the main metwork (ie if u take from behind the second router and hook it up on the first one)?
Im assuming you have port forwarding properly set up in that second router?
You might consider streaming over webdav. I do that for my kodi box, and using a fully qualified url (something.synology.me) and synology's ddns, i can even stream movies on kodi when i am at my parents place with my nas still being in my home....

Edit:
Check my post here: http://forum.kodi.tv/showthread.php?tid=226600&pid=0%23pid0


RE: NFS shares on Synology: "Could not connect to network server" - Memphiz - 2015-07-12

(2015-07-12, 03:06)HerQ Wrote: Recently had the same issue. I had it working fine using OpenELEC however Raspbmc had issues with a newly added NFS share (other shares from the same Synology worked fine).

What you need to do is edit /etc/exports on the Synology (over SSH) and be sure to set the anonid and anonuid to 0.

My /etc/exports looks as follows:

Code:
/volume4/Data *(ro,async,no_wdelay,no_root_squash,insecure,anonuid=0,anongid=0)

And obviously you don't know what you are doing. But yeah just keep posting such stuff.

For all others - THIS is not a solution but a security risk.


NFS shares on Synology: "Could not connect to network server" - Miguix - 2015-07-12

Memphiz, others would understand your concern better if you explain why its a risk


RE: NFS shares on Synology: "Could not connect to network server" - Memphiz - 2015-07-13

(2015-07-12, 03:06)HerQ Wrote:
Code:
/volume4/Data *(ro,async,no_wdelay,no_root_squash,insecure,anonuid=0,anongid=0)

no_root_squash means - if any user with user id 0 (root) connects he will have root access to the nas filesystem aswell. This is OK.

anonuid=0 means that everyone who connects - doesn't matter with which user id - will be mapped to user root on the nas. This is a bad thing to do.

The proper fix is to set the anonuid to some normal user and then ensure that the exported filesystem has proper permissions for this user. Surely this setup makes it working because the nas has a crappy default on the filesystem permissions. (looks like all files are owned by root).


NFS shares on Synology: "Could not connect to network server" - Miguix - 2015-07-13

Thanks, Memphiz!