Phil Hassey
2007-Mar-08 17:32 UTC
Tip for SSH users with connection unexpectedly closed troubles
Thanks for rsync - it's great! I use it for all my backups. I use rsync via SSH. Recently - I was having trouble with my backups: rsync: connection unexpectedly closed (4968349 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(453) [receiver=2.6.9] After following all the steps in the FAQ and issues.html on the rsync website, searching the mailing list, upgrading rsync, using the rsync-debug script, and consulting a number of people someone suggested that I add this to my ~/.ssh/config file: ServerAliveInterval 5 ServerAliveCountMax 120 This fixed the problem -- apparently something between my backup and primary servers was cutting the connection during pauses (I'm still not sure which was, even after research all the points of failure I could). I don't know if many other people have this trouble. But if it is a common problem, it'd be great to add a suggestion to issues.html under Q: Why does my transfer die with something like the following error? If you are using rsync over SSH, make sure the connection isn't being closed due to inactivity. You may need to add ServerAliveInterval and ServerAliveCountMax parameters to your client side ~/.ssh/config file. Thanks! Phil
Wayne Davison
2007-Mar-08 18:35 UTC
Tip for SSH users with connection unexpectedly closed troubles
On Thu, Mar 08, 2007 at 10:32:04AM -0700, Phil Hassey wrote:> someone suggested that I add this to my ~/.ssh/config file: > > ServerAliveInterval 5 > ServerAliveCountMax 120Those options only apply to protocol 2 connections (which people should be using anyway these days). There are also settings for KeepAlive, ClientAliveInterval, and ClientAliveCountMax that someone might want to fiddle with.> it'd be great to add a suggestion to issues.html under > > Q: Why does my transfer die with something like the following error?Good idea. Thanks! ..wayne..
Possibly Parallel Threads
- Problem with ssh disconnecting
- Problem with ssh disconnecting
- Persistent SSH sessions
- ssh client does not timeout if the network fails after ssh_connect but before ssh_exchange_identification, even with Alive options set
- [Bug 1404] New: Make keepalive work properly with Cisco PIX/ASA boxes