rsync: connection unexpectedly closed (0 bytes received so far) [receiver]

chuang liu chliu at cs.uchicago.edu
Sun Feb 17 10:16:33 GMT 2008


Hi:

Thanks a lot for your reponse. I put one colon when I ran the command, but
typed two colons in the email.

I did a few more tests, and found some strange behaviors of rsync. If I
put the address rsync://URL in the src, rsync works fine. But if I put it
as the destination, rsync fails. If I use another format
<hostname>::<module> for the destination, rsync works.

----------------------------
bash-2.05a$ rsync -v  rsync://10.46.62.130:34913/silo/t4.dat what.dat

what.dat
wrote 81 bytes  read 182 bytes  526.00 bytes/sec
total size is 80  speedup is 0.30

bash-2.05a$ rsync -v  what.dat rsync://10.46.62.130:34913/silo/t4.dat
rsync: Unknown host
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(151)


bash-2.05a$ rsync -v  --port=34913 what.dat 10.46.62.130::silo/t4.dat

\what.dat
wrote 119 bytes  read 63 bytes  364.00 bytes/sec
total size is 80  speedup is 0.44

---------------------

I used a very old rsync (version 2.5.4, prototocl version 26). Is this a
known issue with this version? Did I use rsync incorrectly? Thanks.

Chuang


On Fri, 15 Feb 2008, Matt McCutchen wrote:

> On Fri, 2008-02-15 at 19:28 -0600, chuang liu wrote:
> > I am trying to transfer a file from a machine A to a machine B. I ran
> > a rsync deamon on machine B at a given port. Because there is a firewall
> > between these two machines, I opened the port on the firewall. Is this
> > enough to get rsync work through firewall?
> >
> > When I tried the transfer, I got the following error messages.
> >
> > my command:
> > rsync -a --copy-links localfile   rsync:://me@<my
> > IP>:<port>/<module>/test.dat
> >
> > In the client side, the error messages are
> >
> > rsync: Unknown host
> > rsync: connection unexpectedly closed (0 bytes read so far)
> > rsync error: error in rsync protocol data stream (code 12) at io.c(151)
>
> An rsync:// URL should have a single colon.  Since you used two colons,
> rsync parsed the destination as the path "//me@<my
> IP>:<port>/<module>/test.dat" on the daemon on host "rsync", hence the
> "rsync: Unknown host" message.  Get rid of the extra colon.
>
> Matt
>
>
>


More information about the rsync mailing list