hello, I have a following problem while using rsync: rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(189) it was coused by command rsync -r source/ dest/ -e rsh I use rsync-2.6.0 with rsh. What bothers me is that folowing problem apears time to time. I already checked the location of rsync on both machines, both /usr/bin/rsync. I work on solaris-2.8-sparc(remote) and Linux ### 2.4.22-1-686 GNU/Linux(server). could you please help me? thx in advance, Fiver
On Mon, Apr 05, 2004 at 01:02:44PM +0200, fiver@interia.pl wrote:> it was coused by command rsync -r source/ dest/ -e rshThat command can't cause the error you mentioned since there is no host specified on it. I assume you removed a "host:" from either the source or dest, right? (i.e. using a single colon.) The error you cited just means that the remote command failed immediately, so you have to figure out why. Try using --rsync-path=/usr/bin/rsync just to be certain that this isn't a PATH issue. Then, use -vv so you can see the command that is being run. Try that command manually and see if you can discern why it is failing. If you see some kind of permission or other run failure you can fix it and try again. If the remote rsync crashes, you need to figure out why (e.g. enable core dumps, get a core file, and examine it in a debugger). ..wayne..
The first problem is that you're attempting to use a remote transport on a local transfer. The second problem is that you have put "-e rsh" after filespecs, thus having it interpreted as such. What you have asked rsync to do is to put the contents of "source/", "dest/", and the object "-e", in to the directory "rsh". I'm just guessing that's not what you wanted. A correct cmdline to do what it appears you want would be "rsync -r source/ dest/" . If you have removed a hostname from the source or dest path, you'd want "rsync -r -e rsh source/ desthost:dest/" or "rsync -r -e rsh sourcehost:source/ dest/" , depending on which is the remote. If I read my country codes correctly, you're to be commended for interpreting the documentation as well as you have... I sure couldn't read Polish. Tim Conway Unix System Administration Contractor - IBM Global Services desk:3032734776 conway@us.ibm.com hello, I have a following problem while using rsync: rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(189) it was coused by command rsync -r source/ dest/ -e rsh
On Mon, Apr 05, 2004 at 12:45:18PM -0400, Tim Conway wrote:> The second problem is that you have put "-e rsh" after filespecs, thus > having it interpreted as such.Not necessarily. Modern option parsers indulge in option reordering unless told not to (for example, by setting POSIXLY_CORRECT in the environment). Thus, it is likely that the trailing "-e rsh" was interpreted by rsync as a remote-shell option. ..wayne..