Subject: Fw: OpenSSH/Cygwin/rsync problem...
From: Andrew MacKenzie <[email-masked]>
To: [email-masked]
Date: Fri, 23 May 2003 16:11:26 -0400

**resent as my first attempt didn't seem to make it to the list**

I've been running Cygwin on Windows 2000 for quite some time, and it works
great.  Recently, however, I've hit an issue using rsync over ssh.  I've
been using rsync previously to move files from Solaris->Win, Win->Solaris,
Win->Linux, Linux->Win successfully for quite some time, but a recent
upgrade to Cygwin seems to break this.  Are there any known problems with
this?  I've already brought this up on the rsync list, and they think it's
an issue with ssh on cygwin rather than an issue with rsync.

Sorry for the large email, but I like to provide as much info as I can
rather than be asked for it all later.  Thanks in advance for any help with
this issue.

__Cygwinbox__
# uname -a 
CYGWIN_NT-5.0 andrewm2ks 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown Cygwin

# rsync --version
rsync  version 2.5.6  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 32-bit files, socketpairs, hard links, symlinks, batchfiles, 
              no IPv6, 32-bit system inums, 64-bit internal inums

# ssh -v
OpenSSH_3.6.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090702

__SOLARIS__
# ssh -v
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090605f

# rsync --version
rsync  version 2.5.6  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, 
              no IPv6, 64-bit system inums, 64-bit internal inums

__LINUX__
# ssh -v
OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f

# rsync --version
rsync  version 2.5.5  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, 
              IPv6, 64-bit system inums, 64-bit internal inums

This command is run on my cygwin box.  edw450-1-1 is a Sun Solaris box.  I
get the same results if the remote machine is Linux (RedHat 8.0).

__THE ACTUAL PROBLEM__

(partial) Output from  
rsync -e 'ssh -vv -x' -ra --exclude=SunWS_cache --exclude='*.o' --progress --stats Unix amackenz@edw450-1-1:.
(highlighting mine):

amackenz@edw450-1-1's password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug1: fd 4 setting O_NONBLOCK
debug1: fcntl(4, F_SETFL, O_NONBLOCK): Socket operation on non-socket
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug2: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: ssh_session2_setup: id 0
debug1: Sending command: rsync --server -logDtpr . .
debug1: channel 0: request exec
debug2: callback done
debug1: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug1: channel 0: read<=0 rfd 4 len -1
debug1: channel 0: read failed
debug1: channel 0: close_read
channel 0: chan_shutdown_read: close() failed for fd-1: Socket operation on
non-socket
debug1: channel 0: input open -> drain
debug1: channel 0: ibuf empty
debug1: channel 0: send eof
debug1: channel 0: input drain -> closed
debug2: channel 0: rcvd ext data 60
rsync: connection unexpectedly closed (0 bytes read so far)
debug2: channel 0: written 60 to efd 6
debug2: channel 0: rcvd ext data 72
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd close
debug2: channel 0: obuf_empty delayed efd 6/(72)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
debug2: channel 0: written 72 to efd 6
debug1: channel 0: obuf empty
debug1: channel 0: close_write
channel 0: chan_shutdown_write: close() failed for fd-1: Socket operation
on non-socket
debug1: channel 0: output drain -> closed
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug2: fd 0 is not O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.4 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 12
rsync: read error: Connection reset by peer
rsync error: error in rsync protocol data stream (code 12) at
/tmp/rsync-2.5.6/io.c(177)

-- 
// Andrew MacKenzie  |  http://www.edespot.com
// GPG public key: http://www.edespot.com/~amackenz/public.key
// "I cast the miserable trammels of worldly discretion to
// the winds, and spoke with the fervour that filled me, in the
// words that came first." (Wilkie Collins, _The Moonstone_)