A workaround for SMB share disconnects

Apr 04, '08 07:30:00AM

Contributed by: ars

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;xxxx@xxx.xxx.xxx.xxx/xxx$', 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 xxx.xxx.xxx.xxx! 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?

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080328110504281