error in rsync protocol data stream (code 12) at io.c

Jonathan Sabo sabo at
Tue Oct 7 11:22:48 EST 2003

I DID read the archives and from them figured that I would receive a very
helpful responce from you Mr. Schultz.  Thanks for your attention.  The
recomendation to turn up verbosity on the client did not help.  I still only
know that I can connect and then I get an error as shown below:

[root at vice admin]# rsync -avvvvz mysql.sql vader::vice
opening tcp connection to vader port 873
rsync: connection unexpectedly closed (0 bytes read so far)
_exit_cleanup(code=12, file=io.c, line=165): entered
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
_exit_cleanup(code=12, file=io.c, line=165): about to call exit(12)
[root at vice admin]#

Nothing that I can think of has changed on either the server or clients
but obviously something must have because it was working in the past.  I
updated rsync, so it is no longer 17 months outdated:

>>> (09:01pm) (root at vader) (0/pts/0) (~)
# rsync --version
rsync  version 2.5.6  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
              IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

One thing I have noticed while troubleshooting is that other rsync servers
with the same configuration, ie. same rsyncd.conf and xinetd.d/rsync
config respond differently to netcat as shown below:

Working Rsync server:

[root at vice admin]# nc -vvv excelsior 873 [] 873 (rsync) open

@ERROR: protocol startup error
sent 1, rcvd 43

Not Working (vader):

[root at vice admin]# nc -vvv vader 873 [] 873 (rsync) open

sent 2, rcvd 0

So it does look like a network problem.  I have disabled both firewalls on
each machine, even though they shouldn't be affecting this and I still get
the same thing.  I have moved the /etc/hosts.allow files out of the way
along with /etc/hosts.deny.

Running tcpdump on vader while I try to rsync from vice shows the packets
are getting there:

>>> (09:16pm) (root at vader) (0/pts/0) (~)
# tcpdump -i eth0 | grep vice
tcpdump: listening on eth0
21:17:44.973404 vice.48443 > vader.rsync: S
4014526995:4014526995(0) win 5840 <mss 1460,sackOK,timestamp 29518207
0,nop,wscale 0> (DF)
21:17:44.973471 vader.rsync > vice.48443: S
668679285:668679285(0) ack 4014526996 win 5792 <mss 1460,sackOK,timestamp
6919728 29518207,nop,wscale 2> (DF)
21:17:44.973614 vice.48443 > vader.rsync: . ack 1 win
5840 <nop,nop,timestamp 29518207 6919728> (DF)
21:17:44.973678 vice.48443 > vader.rsync: P 1:13(12) ack
1 win
5840 <nop,nop,timestamp 29518207 6919728> (DF)
21:17:44.973708 vader.rsync > vice.48443: . ack 13 win
1448 <nop,nop,timestamp 6919728 29518207> (DF)
21:17:44.973957 vader.rsync > vice.48443: F 1:1(0) ack 13
win 1448 <nop,nop,timestamp 6919728 29518207> (DF)
21:17:44.974387 vice.48443 > vader.rsync: F 13:13(0) ack
2 win
5840 <nop,nop,timestamp 29518208 6919728> (DF)
21:17:44.974413 vader.rsync > vice.48443: . ack 14 win
1448 <nop,nop,timestamp 6919728 29518208> (DF)

So I dont think it is a network problem, the packets from vice are being
sent correctly and are being received.  The rsync server on vader does not
respond correctly.   Do you have any ideas on what else I can change or


Jonathan Sabo
Code 5580

More information about the rsync mailing list