Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A workaround for SMB share disconnects Network
When mounting an SMB share from a Windows 2003 server, I ran into the problem that after about five minutes, the share would disconnect and I would not be able to reconnect to it at all. My system log would say things like this:

KernelEventAgent24 tid 00000000 received VQ_NOTRESP event (1)
KernelEventAgent24 tid 00000000 type 'smbfs', mounted on '/Volumes/xxxx', from '//xxxx;$', not responding
KernelEventAgent24 tid 00000000 found 1 filesystem(s) with problem(s)
loginwindow23 1 server now unresponsive
kernel smb_iod_reconnect: The reconnect failed to! error = 4

I found a solution, after trying many other things. It is probably due to a bug in the network software of Apple or the server. I use a laptop which normally uses a wired connection with fixed IP as a first choice, but there is wireless connection in the building, too, and my laptop pulls an IP number from the DHCP server at the same time via AirPort.

The Airport connection is (normally) not doing anything, as all the traffic goes over the wired Ethernet connection. Apparently after five minutes of inactivity, the Windows server goes on standby, and when my Mac tries to reconnect, it starts using the wireless connection to talk to the server and then fails to reconnect, as the laptop is still using the wired Ethernet for all its network traffic.

The solution is to turn off AirPort when using a wired ethernet connection. By turning off AirPort, my SMB share stays connected and the problem does not happen. Apparently having an IP address for the wired Ethernet connection plus an IP for AirPort messes up the SMB connection. I just have to remember to turn AirPort back on when the wired connection is not available (like at home or elsewhere in my building). This could probably be automated with a launchd script that disables AirPort when Ethernet is available, and enables AirPort when it's not ... any takers?
  • Currently 2.50 / 5
  You rated: 4 / 5 (8 votes cast)

A workaround for SMB share disconnects | 2 comments | Create New Account
Click here to return to the 'A workaround for SMB share disconnects' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A workaround for SMB share disconnects
Authored by: acdha on Apr 04, '08 09:37:12AM

Does "I use a laptop which normally uses a wired connection with fixed IP as a first choice" mean that you've arranged the ethernet connection to be before the Airport connection in the Network preferences? If not, I'd recommend that as it has in the past solved this class of problems.

Otherwise I wrote a hint awhile back about listening for SystemConfiguration changes using Python - it should be straightforward to build a script which would look for status changes on the ethernet interface and adjust the airport interface appropriately.

[ Reply to This | # ]
A workaround for SMB share disconnects
Authored by: jtrott on Jan 20, '09 08:39:40PM

A better solution is to set the DHCP Client ID field in both airport and ethernet to be the same string. It doesn't have to be anything in particular, usually I use the machine name.
This will cause the DHCP server to issue the same IP address to both interfaces.
Subsequently this will also allow you to keep connections open as you swap between airport and ethernet. You can start a copy over airport with the ethernet cable unplugged, then plug in the ethernet cable (and as long as ethernet is above airport in the network list) and see the copy speed up as it is now going over the ethernet connection.

[ Reply to This | # ]