Home Sharing was fine, now "broken" under iOS 5 and/or iTunes 10.6

Both my Apple TVs (one is last year's 720p model, one is the recent 1080p model) drop the Home Sharing connection with the iTunes Library on my Mac. After some idle time and for no reason at all, selecting "Computer" on either aTV will result in the display "Loading [name of iTunes Library]" for a long time with the spinning wheel, then finally stop and return to the home screen. Sometimes there is an error message and sometimes there isn't. Only turning Home Sharing off and then back on on the Mac "fixes" this, but only temporarily.
I can't pinpoint if this started with iTunes 10.6 (10.6.1 did not help), or iOS 5.0 on the aTV. I can say that under iTunes 10.5.x and with the older aTV on iOS 4.x, there were zero problems. I have not since changed my home network, nor my Mac, so this is not a hardware problem on my end. Something in either iTunes 10.6.x or aTV iOS 5.x is causing this failure in Home Sharing.
Any "fixes" or work-arounds to try while we wait for Apple to fix this one? (I have already submitted two bug reports, one under iTunes, one under Apple TV.)

I got pretty tired of getting up and resetting my itunes every time I wanted to watch something on AppleTV or listen to music via the remote app, so I wrote a little ruby app to restart itunes when home sharing breaks.  I noticed that the TCP port 3689 times out when this problem occurs, so I just test to see if that socket will open, if it doesn't, I send commands to close and launch itunes.
The way I figure, this will never interrupt me because I only use this instance of itunes when I'm on appletv or using my remote.  If home sharing is timing out, it means I'm not in the middle of doing one of those things.
Ruby code:
require 'socket'
def is_port_open?(ip, port)
  begin
    TCPSocket.new(ip, port)
  rescue Errno::ECONNREFUSED
    return false
  end
  return true
end
while true
  unless is_port_open?("127.0.0.1", 3689)
    puts "Home sharing is broken.  I am going to restart iTunes. #{Time.now}"
    `osascript -e 'tell application "iTunes" to quit'`
    sleep 10
    `open -a iTunes`
    sleep 30
    puts "iTunes restarted"
  end
  sleep 5
end
If you want a simple way to run this script and are not too comfortable around the command line, I've posted it to amazon S3.  You can just launch a terminal as the user that runs itunes and copy/paste the following:
curl http://djw.s3.amazonaws.com/homesharing-keepalive.rb > ~/Documents/homesharing-keepalive.rb && chmod +x ~/Documents/homesharing-keepalive.rb
Then execute the following when you want to run it:
~/Documents/homesharing-keepalive.rb
If a timeout occurs, you will see something like this printed in the terminal (and itunes will restart):
Home sharing is broken.  I am going to restart iTunes. Mon Jun 04 15:35:28 -0400 2012
iTunes restarted
Keep the terminal minimized so this runs.  If you close it, it will kill the process.  You can also hit cntrl-c in the terminal to kill the script.  The following will remove it from your computer:
rm -f ~/Documents/homesharing-keepalive.rb
More advanced users can use screen or other ways to background the process so you don't need the terminal running (but I don't need to tell you that).
I've only been using this for 24 hours, but it seems to do the trick.
EDIT:  I should note that this is for OSX only.  You could do something very similar in windows, but this won't work.
Message was edited by: aut0maticdan

Similar Messages

  • Home Sharing with Apple TV2 Broken After 4.2 Update

    It looks like I have some company with at least similar issues. This is very frustrating and support was no help.
    ATV 2 worked just great with Windows 7 64-bit and iTunes library until the 4.2 update was loaded. Now ATV 2 keeps telling me to turn on home sharing on a computer but it's already on and iTunes is running, I'm using iTunes 10.2.1.1 and Apple TV2 with latest update 4.2 (2060) and connection over WIFI. Home Sharing is enabled on my computer and ATV2 using the same Apple ID and password. I can get to YouTube and the iTunes store from my ATV 2 without issue.
    I've attempted many solutions from what I could find online but no luck:
    1. Turned off/on home sharing on both the Apple TV 2 and in iTunes (multiple times)
    2. Re-entered my Apple ID and password on both ATV 2 / iTunes
    3. Restarted iTunes and ATV 2
    4. Restarted the DSL modem/router (ZyXEL PK5000z)
    5. Turned the firewall completely off (Norton Internet Security - firewall is off in router)
    6. Restored ATV 2 over WIFI
    7. Reinstalled iTunes
    8. Changed my Apple ID and password then reset in iTunes and ATV 2
    9. Renamed my itunes library
    10. Disabled QoS upstream/downstream protocol in my DSL modem/router
    11. Restored ATV 2 through USB connection in iTunes. This worked for a few minutes but after I turned off ATV 2 and later tried again it was back to it not working...
    Any other ideas?

    Well, I tried a few other things and one worked but again just the first time I tried connecting to the desktop PC with iTunes. I flashed my router with the latest update and the ATV2 could see the iTunes library and I was able to play media. Later in the day I was going to show off to my daughter that I had fixed it and, to my dismay, no go. I tried opening the suggested ports but no luck.
    I then tried loading iTunes on a Win7 laptop and it works perfectly with the ATV2. Both the laptop and the ATV2 are connected to the router wirelessly while the Desktop is connected to the router by Ethernet. Not sure if this is part of the issue as it sounds like this didn't work for others. The only other difference between the laptop and desktop is that the desktop has Win7 SP1 loaded while the laptop does not; now I'm scarred to load it though I don't think that's the issue. All in all, a very vexing situation. Hopefully Apple comes up with a solution soon.

  • My iPod wont turn on i was using it one moment and it was fine now its not turning on. my home button doesnt work so i cant use that solution what should i do now

    My iPod wont turn on i was using it one moment and it was fine now its not turning on. my home button doesnt work so i cant use that solution what should i do now

    Try:
    - iOS: Not responding or does not turn on
    When it says place the iPod in recovery mode,
    Place the iPod in recovery mode using one of these programs:
    For PC
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    If necessary:
    Download QTMLClient.dll & iTunesMobileDevice.dll for RecBoot
    and                                           
    RecBoot tip
    For MAC or PC       
    The Firmware Umbrella - TinyUmbrella
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              

  • HT3819 I have an intel iMac OS 10.6.8 with iTunes 11.0.2 and an Apple TV with software 5.2. Home sharing worked fine until I added a VoIP device to my wired ethernet network. Now Apple TV cannot recognize my computer. How can I reconfigure?

    I have an intel iMac OS 10.6.8 with iTunes 11.0.2 and an Apple TV with software 5.2. Home sharing worked fine until I added a VoIP device to my wired ethernet network. Now Apple TV cannot recognize my computer. How can I reconfigure?

    I have an intel iMac OS 10.6.8 with iTunes 11.0.2 and an Apple TV with software 5.2. Home sharing worked fine until I added a VoIP device to my wired ethernet network. Now Apple TV cannot recognize my computer. How can I reconfigure?

  • I've broken my iPhone and have put my sim card in my old iPhone 3. If I plug my old iPhone 3 into my computer, will it update the iPhone 3 with everything that is on my phone that is now broken, or will it 'update' iTunes with what was on the old iPhone?

    I've broken my iPhone and have put my sim card in my old iPhone 3. If I plug my old iPhone 3 into my computer, will it update the iPhone 3 with everything that is on my phone that is now broken, or will it 'update' iTunes with what was on the old iPhone?

    Plug your phone into the wall charger for at least 30 minutes...make sure you have a sim card in the phone...then:
    Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new.
    Make sure you have no anti-virus software running or any firewalls...turn all of that stuff off.

  • I enabled computer home sharing between my fiance's apple computer and my windows. I am able to play his music on my computer now, however I am making playlists for our wedding, and am unable to transfer any of his songs to my playlists.How can I do this?

    I enabled computer home sharing between my fiance's apple computer and my windows computer, so I now can play his music on my computer; however, I am making playlists for our wedding and am unable to transfer any of his songs to my playlists. How can I do this?

    Thanks
    Are you sure that if I use my windows log in rather than my husbands, then open itunes it won't delete all his hundreds of songs and overwrite with mine? 
    I want to maintain my own apple ID login and he wants his but without losing his songs.....
    how do i transfer the content of my itunes including apps and songs to the new computer.  There doesn't seem to be an easy explanation on here. Do I just plug my iPhone in and it will all transfer?

  • HT204053 I recently changed my e-mail account. I had to reset my apple I.D. and password. All was fine, now when I attempt to login to install updates it shows my old I.D. I don't understand this because when I go into settings it shows my apple I.D. as m

    I recently changed my e-mail account. I had to reset my apple I.D. and password. All was fine, now when I attempt to login to install updates it shows my old I.D. I don't understand this because when I go into settings it shows my apple I.D. as my new one

    I think what is happening is that you changed the email address for password recovery to the new one - the Appleid (and software "attached" to it) remain irrevokably linked to the id you purchased it with.
    Regards,
    Shawn

  • HT4527 home sharing is only adding songs that i purchased on itunes store help

    Iam changing from one laptop to another and home sharing is only adding songs that i bought from itunes store and not downloaded myself, how do i fix this?

    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping.  Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
    In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
    tt2

  • Why will my apple tv only access purchases made in itunes library? My Home Sharing is activated on both my TV and computer, but I continue to get message to activate Home Sharing. I am unable to transfer my movies downloaded in Itunes.

    Why will my Apple TV only accept purchases made in Itunes? I am unable to transfer movies and music that I have  downloaded in Itunes through my Apple TV to my TV. All movies are in an MP3 Ipad format.I have followed every troubleshooting suggestion with no luck. If my Apple TV will transfer purchased music, I must assume the Home Sharing is activate on both my computer and TV.

    Thank you. I meant streaming, not transfer. I have streamed movies through my Apple TV before and watched them on my TV. Now, the only content that will stream is what I purchased in the Itunes store. My Home Sharing is obviously activated or the streaming of purchased items would not work. Both my Itunes and Apple TV are fully updated. Where am I going wrong?

  • My home sharing is on on my Mac ,iPad and iPhone but I can't steel connect to my apple tv

    My home sharing is on on my Mac ,iPad and iPhone but I can't steel connect to my apple tv

    Unfortunately, connecting a non-AirPrint-enabled printer to an AirPort base station's USB port will not make it AirPrint-ready.
    You will need to use another solution, like Printopia, to be able to print to this printer from an iOS device.

  • HT5622 I was setting up the new IOS and came to the point where I needed my Apple ID and password

    I was setting up the new IOS and came to the point where I needed my Apple ID and password.  I had to go and change it before proceeding, now I can't get back to the setup.  Can you tell me how to go back and finish the setup?

    Settings > Store > Sign Out.
    Sign in with the correct ID.

  • Home sharing no longer shows up on my macbook pro iTunes.

    Home sharing no longer shows up on my macbook pro iTunes. Our main computer is a Dell desktop that is authorized for home sharing. My macbook has also turned on home sharing, but the home computer does not show up. How exactly does home sharing work? Must you be in the same area to be able to use this feature or connected to the same network?

    you will need both computer have itunes turned on and you will need a wifi for them to work.

  • My Mac Mail subfolders on my MacBook Air will not sync in alphabetical order. I am assuming it is a setting that I am not finding since my iMac based at my home office is fine, so is my iPad and iPhone. The core source is Exchange.

    My Mac Mail subfolders on my MacBook Air will not sync in alphabetical order. I am assuming it is a setting that I am not finding since my iMac based at my home office is fine, so is my iPad and iPhone. The core source is Exchange.

    If you have been using the mac.com Apple ID to make iTunes purchases recently, then there should be no issues continuing to use it with the new iPhone. I would abandon the new ID as you will never get Apple to merge the two IDs. I have had a mac.com ID for years and continue to use it with my iPhone 4S.
    Tell us the issues that you encounter trying to set up the iPhone with the mac.com account.

  • My ipad was stolen now i found it and now it requested me of that person id and i dont have what do i have to do

    my ipad was stolen now i found it and now it requested me of that person

    If you forgot your Apple ID try here: http://iforgot.apple.com

  • Hi, I was wondering if someone could help me, I recently restored my itouch 4th Gen and was then told to upgrade to itunes 10.6 now everytime I try and install itunes I get the following message, help please!

    Hi, I was wondering if someone could help me, I recently restored my itouch 4th Gen and was then told to upgrade to itunes 10.6 now everytime I try and install itunes I get the following message, help please!
    Error writing to file: C:\Program\Files\iTunes.Resources\de.Iproj\SortPrefixes.plist.   Verify that you have access to that directory.

    Error writing to file: C:\Program\Files\iTunes.Resources\de.Iproj\SortPrefixes.plist.   Verify that you have access to that directory.
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    Vista instructions in the following document: Check your hard disk for errors
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

Maybe you are looking for

  • ABAP Dump when executing DTP

    Dear gurus:        I just faced an annoying problem when executing DTP in t-code RSA1. It appears an  ABAP dump here. The ABAP dump is briefly shown below. And I found that it seems to be an authorization problem, because when I use a new account whi

  • What is a lock in a synchronized method ??

    Greetings, I have a synchronized reset method whose job is to reset every variable i am using in that class.. its a synchronized method so when i am doing the reset stuff, no other method in that class can update that variable. But someone told me i

  • Pics in camera vs. photos app

    Can I delete the pics under the photo app without deleting the pics in the camera app?  I want to make storage available.

  • Mac & Nokia Syncing Over-the-Air vs Bluetooth

    Over the last 5 years, I've owned a number of high-end Nokia phones and Mac laptops. The principle source of my anguish has been keeping my Nokia's contacts in Full-sync with my Mac's Address Book ;-)  I think I ended up buying 3-4 different iSync Bl

  • Best book for UNIX in the UK

    Hiya, I just wanted to find out whether anyone know of a good, sound book to teach UNIX with sufficient scope to master more complex aspects of UNIX commands. Things like "...for dummies" is not what I am looking for as it is far too, well "dummy". A