AppleTV 2 (black) - NFS Support

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
cmyers Offline
Junior Member
Posts: 4
Joined: Mar 2012
Reputation: 0
Post: #1
Hey all,

I just got an ATV2 a week or two ago, I have it JB and running Eden RC2 no problems. The only thing I can't get working is NFS, which sadly is the main thing I want it for. I want to watch videos on my NFS fileserver.

If samba is the only way I can set that up but I don't want to do that before someone tells me it def. works... and I would way prefer NFS.

When I try to do NFS with debug turned up, I see this in the logs:

ERROR: Failed to open(//) opendir call failed with "Server responded: Program not available"
ERROR: GetDirectory - Error getting nfs://10.0.1.20/media/fileserver/

Does "program not available" mean I need to install the NFS client somehow? Do I need to build this or something? I am highly technical and I swear I will blog/wiki this if someone helps me get it working =)
before anyone asks:

1. I have the NFS share mounted successfully on other machines
2. I can ping the box from the ATV just fine
3. I can SCP movies manually to the ATV and play them off the local storage fine

If NFS/Samba is a no-go, how about SSHFS? Anyone know if that is built for iOS?
(This post was last modified: 2012-03-15 10:11 by cmyers.)
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,827
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #2
Read the nfs wiki link from my signature. Read it again. Follow it. Have fun ... Smile

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
cmyers Offline
Junior Member
Posts: 4
Joined: Mar 2012
Reputation: 0
Post: #3
(2012-03-15 11:29)Memphiz Wrote:  Read the nfs wiki link from my signature. Read it again. Follow it. Have fun ... Smile

Um... I've read that already. It explains how to set up a share. It doesn't explain how to enable the other end - the NFS share is working but I cannot get my ATV2 to mount it. Can you be more specific what exactly I am supposed to do when a media of type nfs://IP/path/to/share doesn't work?
find quote
Ozymandyaz Offline
Member
Posts: 84
Joined: May 2011
Reputation: 0
Location: Toronto, ON
Post: #4
What type of NFS server are you using?

And FYI - In general NFS works just fine for iOS/ATV2 users and Memphiz is the developer who implemented it, so be nice to him =)

Guide for MySQL database using Synology NAS
http://youtu.be/3PmmDtK65ks

Silent AppleTV with Crystalbuntu
http://quixventure.com/2011/12/crystalbu...roduction/
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,827
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #5
show me the full xbmc.log with debugging turned on (post it to pastebin and put the link here). Normally users are just struggeling to configure the server for allowing access from unprivileged ports. It depends on the server you use (for linux nfs server its the part about the "insecure" flag, for osx nfs server its the "-N" edit in the plist - this is covered in the wiki). Or its a permission issue.

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
cmyers Offline
Junior Member
Posts: 4
Joined: Mar 2012
Reputation: 0
Post: #6
I am using a Debian Linux NFS server. You are right that I was missing the "insecure" part so I will add that to my config and test again next time I am home (probably tonight). What really threw me off was the error message saying "program not available" - if that error can mean the server has a bad config, I'd be glad to go find the source and fix that message to be more descriptive, and submit that as a patch. We'll know more when I try again tonight. If it still doesn't work I will post a full xmbc log.

Thanks!
-Carl
find quote
cmyers Offline
Junior Member
Posts: 4
Joined: Mar 2012
Reputation: 0
Post: #7
I finally got a chance to fetch down the code and start poking around. I looked at the Eden branch but couldn't find "Failed to open(" anywhere in the code. I looked at the master branch and it looks like the NFS stuff moved around a bunch, so maybe I won't submit a patch. I guess I need to try out the master branch at home and see if the error message is any clearer now, and if not, then I will figure out how to fix it. Thanks again!
-Carl
(oh, and since it looks like I forgot to post - yes, the "insecure" missing thing WAS why it didn't work, so the only "bug" here is I didn't realize that was important, and the error message wasn't helpful)
(This post was last modified: 2012-04-04 06:44 by cmyers.)
find quote
turbinez Offline
Fan
Posts: 327
Joined: Sep 2008
Reputation: 0
Post: #8
Are there any advantages to using a NFS server as oppose to AFP or SMB? I'm confused on which one is the best to use?
find quote
finite9 Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #9
You can't really just say "read the guide again" because if you've got mental block, reading it ten times isn't going to help.

I had the exact same issue. nfs server is Ubuntu sever 11.10, nfs shares working perfectly to Fedora client, but XBMC could only see the server IP and folder shares, but not the files.

I had set the insecure flag so I was really confused and frustrated. Then i realised by your comment "configure the server to allow access from UNPRIVILEGED PORTS"

When you read all the official NFS guides on the net, they all say to create a hosts.allow and hosts.deny file with the following data:

hosts.allow

portmap: 192.168.1.*
lockd: 192.168.1.*
rquotad: 192.168.1.*
mountd: 192.168.1.*
statd: 192.168.1.*

hosts.deny

portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

And this locks down hosts to the same subnet that my server is running on. This caused XBMC NFS share to not see the files. Once I commented out the lines in hosts.deny and set "*" instead of 192.168.1.* in hosts.allow, then my xbmc starting seeing all the files and it worked fine.

It's not enough to just detail how to configure /etc/exports when all official guides tell you how to lock down nfs. I've just spent ages getting my atv2 jailbroken and putting xbmc on it, so im not willing to start troubleshooting exactly what the issue is. maybe in a few weeks Smile

By the way, my /etc/exports looks like this. This didn't work on atv2 until I changed hosts.allow|deny:

/data2/music *(ro,no_subtree_check,all_squash,insecure)
/data2/movies *(ro,no_subtree_check,all_squash,insecure)
/data1/tv *(ro,async,no_subtree_check,all_squash,insecure)
/data2/photos *(ro,no_subtree_check,all_squash,insecure)
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,827
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #10
Hosts.allow and deny is a distribution dependend pre firewall crap stuff. You won't see me starting to also guide everyone through this. Because then i could start on "how to install linux". My willing to support problems in this forum has some sharp drawn lines which i have to obey for myself to not fall into the "free-time-only-is-made-of-xbmc" hole.

But of course everyone else is free to adapt the wiki to make it more and more complete (tbh only the core parts from the nfs wiki page are done by me - but nobody tried to simplify these yet - and there is my mental block, because i know to much about linux and nfs Wink ).

I'm aware of the fact that nfs is not the easy one click solution when it comes to non-linux experienced users. But i don't see this as my goal because then i could just stop coding and only do support in my free time (and thats definitly nothing which i would like to have as my hobby).

And in general - this default entrys for hosts.allow are a bit borderlined imho. Because it denies someone to have more then one subnet in a lan. But then again i wonder why private LANs should have the need of more then one subnet. Having multiple subnets will give some more trouble in conjuction with XBMC when it comes to zeroconf and airplay. So if i was just lazy i could add the statement "nfs server has to be in the same subnet as the XBMC client" to the wiki, but i don't think that is the right way to handle this.

thx for reading...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
(This post was last modified: 2012-04-18 17:20 by Memphiz.)
find quote