Problem with rsync on WinXP going to HP-UX or Linux

Stan Sieler sieler at allegro.com
Wed Nov 9 22:50:37 GMT 2005


Hi,

I can't get rsync from a PC to an HP-UX or Linux box to work,
and am hoping for a pointer or two.

I checked the FAQ and googled ... with no luck, so I hope this isn't
a patently obvious newbie problem :)

I just got interested in trying to use rsync to backup my WinXP PC to
a Linux or HP-UX computer.  I got the cygwin package from Robert
Scholten's site at http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html.

Environment:

   "ozma" is an HP-UX rp2430, running 11.11; 

       rsync  version 2.6.4  protocol version 29
       (2.6.6 requires too many things we don't have installed)

       /etc/rsyncd.conf has: [ftp]
                                path = /tmp/ftp
                                comment = ftp export area

       /etc/services has:   rsync           873/tcp              # rsync

       /etc/inetd.conf has: sync   stream  tcp     nowait  root   /usr/local/bin/rsync rsyncd --daemon


   "opus" is a RedHat Linux system runnning, uh, well, maye it's 2.4.20-28.7 as reported by uname -a?;

       rsync  version 2.5.7  protocol version 26

       /etc/services has:   rsync           873/tcp                         # rsync
                            rsync           873/udp                         # rsync

       /etc/xinetd.d/rsync has:
           service rsync
           {
                   disable = no
                   socket_type     = stream
                   wait            = no
                   user            = root
                   server          = /usr/bin/rsync
                   server_args     = --daemon
                   log_on_failure  += USERID
           }

       (we run xinetd, not inetd)


   "tinman" is my WinXP Pro SP2 PC

       rsh is the Windows distrution version

       rsync is cygwin's  2.5.1, protocol version 25

       set PATH=c:\rsync;%PATH%
       set CYGWIN=binmode tty
       set TERM=ansi
       set USERNAME=sieler
       set HOME=c:\rsync
       set RSYNC_RSH=rsh.exe

       (a copy of the \WINDOWS\SYSTEM32\RSH.EXE is in my C:\RSYNC directory)


So....


1. from PC to HP-UX: rsh works, rsynch doesn't

rsh from the PC to an HP-UX box (11.11) works fine:

   (PC):   rsh ozma uname
           HP-UX

but rsync to the HP-UX box fails:

   (PC):   rsync foo ozma:/tmp/foo
           Terminal read: The handle is invalid.
           rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
           rsync error: error in rsync protocol data stream (code 12) at io.c(420)
           rsync: read error: Connection reset by peer
           rsync error: error in rsync protocol data stream (code 12) at io.c(151)


2. from PC to Linux: nothing works

rsh from the PC to the Linux box simply times out after about 30 seconds:

   (PC):   rsh opus uname
           (30 second delay)
           opus.allegro.com: Permission denied
           rsh.exe: can't establish connection

rsync similarly times out:

   (PC):   rsync foo opus:/tmp/foo
           opus.allegro.com: Permission denied.
           rsh.exe: can't establish connection
           rsync: read error: Connection reset by peer
           rsync error: error in rsync protocol data stream (code 12) at io.c(151)

-----

Other info...

3. rsh from Linux to HP-UX: works

   (Linux):   rsh ozma uname
              HP-UX

4. rsync from Linux to HP-UX: works

   (Linux):   rsync -v mime ozma:/tmp/mime
              mime
              wrote 83 bytes  read 54 bytes  91.33 bytes/sec
              total size is 1812  speedup is 13.23

5. rsh from HP-UX to Linux: works

   (HP-UX):   remsh opus uname
              Linux

              rsync ss.startup.notes opus:/tmp/ss.startup.notes
              ssh: connect to host opus port 22: Connection refused
              rsync: connection unexpectedly closed (0 bytes received so far) [sender]
              rsync error: error in rsync protocol data stream (code 12) at io.c(420)

6. rsync from HP-UX to Linux: fails

   (HP-UX): rsync stdlist.179.nofilter.txt opus:/tmp/foo9
            ssh: connect to host opus port 22: Connection refused
            rsync: connection unexpectedly closed (0 bytes received so far) [sender]
            rsync error: error in rsync protocol data stream (code 12) at io.c(420)

   Hmmm...if I switch to rsh:

   (HP-UX): rsync -v --rsync-path=/usr/bin/rsync --rsh=/usr/bin/rsh foo opus:/tmp/foo
            /usr/bin/rsh: opus:  not found.
            rsync: connection unexpectedly closed (0 bytes received so far) [sender]
            rsync error: error in rsync protocol data stream (code 12) at io.c(420)

   but, /usr/bin/rsh and /usr/bin/rsync are indeed present and runnable by me on 
   opus (the Linux box).

   If I change "/usr/bin/rsh" in the above to a bad name, like "/usr/bin/ZZZ",
   I get: sync: Failed to exec /usr/bin/ZZZ: No such file or directory (2)
   so I know that's the apparently right syntax :)


thanks,

-- 
Stan Sieler
work:     www.allegro.com
personal: www.sieler.com/wanted/index.html  


More information about the rsync mailing list