Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Keep losing connection to AFP & SAMBA shares

Hello,

A couple of weeks ago, I purchased a QNAP NAS for use as a Time Machine backup, Squeezebox Server and Media Server. The QNAP sits in our basement (in an apartment block) and connected via Homeplug ethernet adaptors. The idea here being a "Semi" offsite storage and media server in case of loss in our apartment.


The speed to the basement via the Homeplugs is not terribly fast, but I was getting 25mbps when I tested it, and it seems stable. It is fast enough to stream most types of HD video that I have tried.


My problem is this: I keep losing connection via the AFP or Samba shares. Now, I'm not terribly advanced in computer tech, and only a bit more of a year in on Mac talk since I came from a Windows world. So, please be gentle with me :O)


When the iMac (late 2010, now with Lion) wakes, it may or may not make a connection with the NAS via AFP or SAMBA. I know when it has made a connection by two ways. 1) I can see the shared AFT or SAMBA folders in Finder and 2) Time Machine could make backups.


I started noticing though, every now and again, Time Machine would fail to make a backup as it could not find the backup server. I noticed on those occasions that I could also not see the AFP or SAMBA shares in Finder. They were visible when Time Machine was working fine.


Now, if I put the iMac to sleep, and woke up, it often would then re-connect to those mentioned shares, and Time Machine would start immediately. However, at some point it would disconnect from those shares and when that happens the only way I could reconnect is to sleep and wake again. (though sometimes after waking, it still would not connect via AFP or SAMBA). Using the Go>Connect to Server option in the Finder menu will not connect to AFP or SAMBA if it has disconnected as described.


Now, I know that the network connection to the NAS is fine, because even when I can't connect via AFP or SAMBA, on the same iMac, I can successfully ping the QNAP server and I can connect to the QNAP via the browser admin portal - this is all from the same iMac which at the same time may not be able to connect via AFP or SAMBA. I can stream music from it to my Squeezeboxes as well.


So, the problem seems to me at least, to be either a Mac Lion issue where there is a fault or problem with AFP or SAMBA connections to remote servers, or a QNAP problem in accepting AFP or SAMBA connections. As we stand, QNAP are claiming they have no such issues and the problem is with my iMac, so although I am not terribly convinced in their assurances, I wanted to see if anyone here may know if Lion does indeed have the odd issue that I described and if there is a solution.


My Mac is connected via an ethernet cable, directly to my wireless router's Cat5e Switchport (why? because I was having problems with wifi dropping since updating to Lion and found this to be more stable). Another ethernet cable from the same switch then goes to a Powerline adaptor. The NAS is directly connected to another powerline adaptor in the basement.


Could it also be an issue with the Switch? It is afterall just part of the router my ISP gives me. Has there been reports where routers can block AFP or SAMBA connections, or drop them, whilst allowing other protocols to connect through?


I would seriously appreciate anyone's help here. I have had to stop my Time Machine backups, as in the last week, twice it seemed to have become corrupted and is forcing me to do a whole new backup from scratch. This really bothers me, as I then have to connect the NAS directly to the iMac for at least 24hours for that backup to finish, and during that time all my data is at risk of being lost. I am suspecting that the backup became corrupted when the AFP share dropped out at a crucial time in the backup (is this possible?)


Thanks in advance for your help.

iMac (27-inch Mid 2010), Mac OS X (10.7.2)

Posted on Jan 17, 2012 5:58 AM

Reply
26 replies

Jan 31, 2012 2:26 AM in response to ovbg

Ok, no luck yet. Maybe I can ask another question directly related to this issue. I am trying to find the cause of this and I am wondering if there is a brief dropout in the connection to the NAS. By brief, I mean really brief. The NAS is connected via a Homeplug network connection (network via the homes power points) and maybe for a very brief period interferrence on the lines dropped the AFP connection.


Is it normal that it is then impossible for AFP to reconnect, even when the NAS is clearly back on the network?


Any drop will have to be very brief as I can always stream music without issues, and no drop or slow down has caused buffering issues.


But, I don't recall getting this issue when directly connected to the iMac via a short ethernet cable for the initial Time Machine backups that take over a day.


What I don't understand though, is if the connection did briefly drop and loose the AFP link, why can AFP no longer connect back? Why do I need to sleep the iMac and then wake it again.


HTTP connections to the NAS never seem to drop, and when I can't recconnect via AFP, I can always connect via HTTP? Is this expected of the AFP protocol? Or is it an unexpected issue?

Feb 23, 2012 3:03 AM in response to ovbg

I have a similar, if slightly simpler problem.


External drive connected to imac shared via AFP to a boxee box.


If the imac gets put to sleep and woken, the boxee loses connection to the AFP share and won't reconnect. I need to re-start the imac to get the drive working on the boxee again.


I have found that using SMB, i don't get this problem but straming movies is slower and I get buffering.

May 12, 2012 6:37 PM in response to ovbg

Shame no one seems to have answered this yet. I have the same issue using a Lacie Netspace 2 NAS drive linked to my Mac via Netgear switch. Once the Mac goes to sleep it doesn't seem to automatically re-pickup the NAS drive when Time Machine kicks into action. Must be a Lion issue as its unlikely that all these makes of NAS have the same issue.

May 17, 2012 5:29 AM in response to ovbg

I am having exactly the same problem. It is not solely a Lion problem as we have 2 Macbook airs. one with Lion and one with snow leopard, connecting to a qnap ts210. Both behave as above.


I have the sneeking suspicion it may be connected to the wifi connection, as it seemed to work better when the NAS was physically connected to the router, rather than by wifi.


I have disabled the wifi connection and am using an ethernet cable at the moment.


Will report further, once reliability has been assessed.

May 18, 2012 5:36 AM in response to Candyjet

Just double checking something to make sure you are right. Are the Macs working on wi-fi or not ? I think there is a chance that the wi-fi from the mac is not waking up my NAS drive ? My NAS drive is cable connected all the time to the router in our loft and Time Machine seems to work ok if the mac is also on the cat5. My issue appears to surface when the Mac itself is connected by wi-fi.

Nov 26, 2012 12:26 PM in response to ovbg

I have the same problem. OSX 10.8.2, AFP and a QNAP.... My Qnap and iMac both have an ethernet connection to the same switch (Gig) and everynow and again the server disappear's from finder. You can connect to it via IP address in a browser or via APPLE+K that works fine.


This has recently happened and I fear its an Apple update. My QNAP and iMAC have been working hand in hand for years very well.

Apr 16, 2013 12:55 PM in response to ovbg

I have the exactly same problem. I have OSX 10.8.3 and I use a Synology NAS. I used AFP and SMB and also used wifi and ethernet connections.


It looks like a sleep issue, but I'm not sure if mac sleep or NAS sleep.


It's particularly anoying if you use iTunes on the NAS as the library gets locked ans you have to reboot the nas to unlock it.


I found a script (google) to reconnect the NAS which is useful if you're connecting to many shared folders.


anyone have any update or found a workaround for this?

Keep losing connection to AFP & SAMBA shares

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.