Kodi Community Forum
[AppleTV2] NFS on Apple TV 2? - 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: iOS & tvOS (https://forum.kodi.tv/forumdisplay.php?fid=137)
+---- Thread: [AppleTV2] NFS on Apple TV 2? (/showthread.php?tid=91776)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12


- Memphiz - 2011-07-18

jlor Wrote:I don't believe scraping will work because the NFS client can't read the files in sub-directories, so how should it scrape them? Smile

Anyway, I suppose you could grab the newest version of the nfslib from their git, compile it yourself and drop it in.. That might work, but I honestly wouldn't know where to start.. I have never done any real compiling on a Mac OSX platform.

nope this will not work ... api has changed ... xbmc would crash after that Wink ... but i'll get it in these days i think ...


- banzai75x - 2011-07-23

Does anyone know what this error means? I have a similar config to Anth0. Using Synology as my server.

DEBUG: Loading: /var/stash/Applications/XBMC.frappliance/Frameworks/libnfs.1.0.0.dylib
23:09:13 T:135438336 M:122290176 ERROR: NFS: Failed to mount nfs share: Socket failed with POLLHUP
23:09:13 T:125640704 M:122290176 ERROR: GetDirectory - Error getting nfs://192.168.1.131/volume1/video/
23:09:13 T:125640704 M:122290176

Exports:
/volume1/video *(rw,all_squash,insecure)

Sources:
<source>
<name>Test</name>
<path pathversion="1">nfs://192.168.1.131/volume1/video/</path>
</source>

Using latest nightly build for ATV2 dated 7/18


- Memphiz - 2011-07-23

please retry with the nightly from yesterday ... if still no luck tell me something about the used network and server os...


NFS with ATV1 - sacrefrancais - 2011-07-26

1 - Download XBMC nightly (necessary).

2 - If using ATV2, the file "/System/Library/LaunchDaemons/com.apple.nfsd.plist" on your mac has to be edited to allow non-root users to connect to the NFS server. Add the following "-N" option to the startup parameters and save so file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/etc/exports</key>
<true/>
</dict>
</dict>
<key>Label</key>
<string>com.apple.nfsd</string>
<key>ProgramArguments</key>

<array>
<string>/sbin/nfsd</string>
<string>-N</string>
</array>

</dict>
</plist>

3 - Download NFS Manager. Under Share Definitions, click "Select" button to locate media folder, uncheck "Share 'read only'" and check "Allow clients to also mount objects in shared directory."

4 - Under Shared Objects, choose "Select remote server," then select NFS server from the popup window. The Export Specification should be the location of media files on your mac.

5 - Browse for video sources and choose zeroconf browser. Finish setup of shared location. Exit XBMC and reboot both ATV and Mac.

(If using ATV1 with receiver for audio output, and audio is nuked, turn off Digital Audio Out under IOS settings. DTS and 5.1 will still work in XBMC.)

FWIW, NFS seems superior to running SMB share from mac, which was itself superior to running SMB share from Airport Extreme with attached USB HDD.

Thanks for incorporating an NFS client into nightly, Memphiz! No more having to wait for inferior SMB compatibility in Lion.


- Memphiz - 2011-07-26

Sadly this nice howto won't work with the atv2 because one very important config step is missing. If you please would be so kind to copy the adaption to the plist file from the snow leo wiki entry (2nd link in my sig) into your howto then i would maybe consider to put this to the wiki aswell...

thx Smile

memphiz


- logan_x50 - 2011-07-26

sacrefrancais Wrote:I didn't see a thread for running an NFS share with ATV1, but my guess is that the process will be similar, so here's how I got it to work on my system:

1 - Download NFS Manager. Under Share Definitions, click the "Select" button to locate your media folder, uncheck "Share 'read only'" and check "Allow clients to also mount objects in shared directory."

2 - Under Advanced Options, select "Allow mounting the folder or any subfolder inside."

3 - Click Apply.

4 - Under Shared Objects, choose "Select remote server," then choose your NFS server from the popup window. The Export Specification should be the location of your media files on your mac.

6 - Download most recent XBMC nightly, browse for video sources, and choose zeroconf. XBMC should see your new NFS server. Finish setup of new shared location.

7 - Exit XBMC and reboot ATV. If using an ATV1 with a receiver for audio output, turn off Digital Audio Out under IOS settings. (The latest nightly nuked my audio using either UPnP or NFS for some reason.)

8 - If using ATV2, "/System/Library/LaunchDaemons/com.apple.nfsd.plist" has to be edited to allow non root users to connect to the NFS server. Add the option "-N" to the startup parameters. Otherwise XBMC can only access the NFS server when run as root.

<array>
<string>/sbin/nfsd</string>
<string>-N</string>
</array>

FWIW, at first blush NFS seems superior to running an SMB share from my mac, which was itself superior to running an SMB share from Airport Extreme with an attached USB HDD.

Thanks for incorporating an NFS client into the latest nightly, Memphiz! No more having to wait for inferior SMB compatibility in Lion.

Hi,

I have managed to get NFS working on my iMAC with a local XBMC installed. The share is to an external HDD connected directly to my iMAc.

However, I can't get it working on the ATV2. Firstly there isn't "/System/Library/LaunchDaemons/com.apple.nfsd.plist" as far as I can see on my ATV2. Can I just copy this over from my iMAC?

Next the zeroconf browser doesn't show NFS, only the SMB share. Should it or will this only work once I've added "/System/Library/LaunchDaemons/com.apple.nfsd.plist" with -N?

Any help appreciated. Desperate to upgrade to Lion but need this to work first.

I should say my ATV2 is running XBMC 10.0-9


- sacrefrancais - 2011-07-26

I think that file just needs to be edited on your mac, not the ATV.

And you need the latest nightly as it has NFS functionality built in, whereas Dharma does not.


Connect ATV2 XBMC to NFS Server running on WHS - awp0 - 2011-07-27

I didn't see this covered anywhere so I thought I'd chime in with steps to connect to a NFS server running on WHS (Windows Home Server). It's pretty easy, but there were a couple of details that took some time to figure out. I got this working first for my WDTV Live and then today I got it configured with the ATV2. So maybe I can save a headache or two:

1. Install nightly XBMC build
2. Follow this guide to install and configure and NFS server using Windows Services for Unix:
http://www.mediasmartserver.net/2009/12/11/guide-setting-up-nfs-in-whs/

Note the following changes from the guide:
* Users: The guide above assumes the unix user is root, but ours is "mobile" (501). You'll need to edit the passwords and groups files to add the "mobile" user and group. Then you'll need to make sure to map "mobile" instead of "root".
* Firewall exceptions: I had to add port 1053 (UDP and TCP) to the firewall exception list. I don't really know why, as it's not documented anywhere. But while troubleshooting the configuration, I enabled firewall logging and found that the firewall was dropping inbound packets to port 1053. As soon as I added that exception everything started working.

3. After all of the Windows configuration, I simply added the sources through the XBMC UI, using "browse->NFS network share" (or whatever it is) and it all seems good.

Scraping isn't working, but it seems like that is a known issue. Video seems very smooth so far.

Hope this helps someone.


- owen-b - 2011-07-30

Hi all,

I've got some weird problems trying to set up NFS. I didn't have these issues last week, when I got it running okay but my ATV2 couldn't see it. I left it for a week and today updated to a nightly build of ATV2 and tried again.

My nfsd.plist file looks like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>KeepAlive</key>
    <dict>
        <key>PathState</key>
        <dict>
            <key>/etc/exports</key>
            <true/>
        </dict>
    </dict>
    <key>Label</key>
    <string>com.apple.nfsd</string>
    <key>ProgramArguments</key>
    <array>
        <string>/sbin/nfsd</string>
        <string>-N</string>
    </array>
</dict>
</plist>

My /etc/exports file looks like this:

Code:
/Volumes/External/Media/TV -alldirs
/Volumes/External/Media/Films -alldirs

I've run the following in Terminal:

Code:
sudo nfsd enable
sudo nfsd start

Whenever I type the start command I get:

Quote:Starting the nfsd service

And whenever I've made changes to /exports I've run:

Code:
sudo nfsd restart

which always results in the following, even if I typed the start command a few seconds prior:

Quote:The nfsd service does not appear to be running.
Starting the nfsd service

And when I run:

Code:
showmount -e

I get the following error message after about 30 seconds of inactivity:

Quote:showmount: Cannot retrieve info from host: localhost: RPC failed:: RPC: Unable to send; errno = Bad file descriptor

I did some light Googling of RPC and while it's not something I really understand, I did try the rpcinfo -p command and got the following error:

Quote:rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refuse

Meanwhile in NFS Manager, while I can see the two paths in the Share Definitions tab, when I hit Apply I get the following error message:

Quote:The data has been saved successfully. The operating system returned an error when activating the new entries, however.

Please review your configuration changes. The console log of the operating system may contain further information why activation of the modified entries could not be completed.

And I don't see anything popping up in the Shared Objects windows, except the lan name of my computer in 'Select Remote Server'.

Like I say, last week when I was trying all this stuff the showmount -e command listed the two shared folders fine. I don't understand what's changed in that time. I booted into my SL backup for the last week as I was hating Lion, but the files contained on the actual iMac haven't been touched in that time as a result.

Any ideas?


- Memphiz - 2011-07-31

what does the console log say? It should have an error why your nfsd refused to start ...


- Buadhai - 2011-08-04

Try running 'sudo nfsd restart' twice as follows:

Code:
Bleach:etc mnewman$ sudo nfsd restart
Password:
Bleach:etc mnewman$ ps -ax | grep nfsd
25211 ttys000    0:00.00 grep nfsd

The line 'ps -ax | grep nfsd' searches for nfsd in all running processes.

As you can see, there is no nfsd process.

Now, run it again:

Code:
Bleach:etc mnewman$ sudo nfsd restart
The nfsd service does not appear to be running.
Starting the nfsd service
Bleach:etc mnewman$ ps -ax | grep nfsd
25216 ??         0:00.01 /sbin/nfsd -N
25219 ttys000    0:00.00 grep nfsd

Ah ha! Now it's running. Why do you have to 'restart' twice? No idea. Same goes with 'start'. I have to run it twice to get the nfsd process actually running.

After you get it running I'll be interested to hear how it works. I have nfs running on a MacMini (10.6.8). XBMC can see the nfs share and can even start playing a video file. But, it always freezes within a minute or two of starting the video playback.


- Buadhai - 2011-08-04

Here are the log entries for the double restart. As you can see, the first one doesn't actually restart nfsd:

Code:
8/4/11 11:46:49 AM    sudo[25242]    mnewman : TTY=ttys000 ; PWD=/private/etc ; USER=root ; COMMAND=/sbin/nfsd restart
8/4/11 11:46:51 AM    sudo[25247]    mnewman : TTY=ttys000 ; PWD=/private/etc ; USER=root ; COMMAND=/sbin/nfsd restart
8/4/11 11:46:51 AM    /sbin/nfsd[25249]    nfsd starting
8/4/11 11:46:51 AM    /sbin/nfsd[25249]    verbose level set to 3
8/4/11 11:46:51 AM    /sbin/nfsd[25249]    Too many groups for mnewman



- owen-b - 2011-08-11

Memphiz Wrote:what does the console log say? It should have an error why your nfsd refused to start ...

Scuse the n00b question - where do I find the relevant console log? Thanks.


- threatdisplay - 2011-08-13

just got nfs working on my mac (hackintosh) and atv...

one thing to note about editing your "/System/Library/LaunchDaemons/com.apple.nfsd.plist" file... you have to restart your mac for the settings to take effect. took me a few tries with the atv2 crashing and scratching my head to figure that one out =)

much faster now... 720 files playing with no buffering whatsoever =)


- Buadhai - 2011-08-13

threatdisplay Wrote:just got nfs working on my mac (hackintosh) and atv...

Which Mac OS are you running?