Updated to mention the release of 2.6.4.
[rsync-web.git] / issues.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>rsync current issues</TITLE>
5 </HEAD>
6 <!--#include virtual="header.html" -->
7
8 <H2 align="center">current issues and debugging</H2>
9
10 <ol>
11
12 <li><p><b>Q:</b>
13
14 Transfers die with something like
15
16 <pre>rsync: error writing 4 unbuffered bytes - exiting: Broken pipe
17 rsync error: error in rsync protocol data stream (code 12) at io.c(463)
18 </pre>
19
20 <p>or
21
22 <pre>rsync: connection unexpectedly closed (24 bytes read so far)
23 rsync error: error in rsync protocol data stream (code 12) at io.c(342)
24 </pre>
25
26 <p><b>A:</b>
27
28 This error tells you that the local rsync was trying to talk to the remote
29 rsync, but the connection to that rsync is now gone.  The thing you must
30 figure out is <b>why</b>, and that can involve some investigative work.
31
32 <p>If the remote rsync is a daemon, your first step should be to look at
33 the daemon's log file to see if it logged an error explaining why it
34 aborted the transfer.
35
36 <p>Rsync 2.6.3 does a better job of retreiving the error from the remote
37 process than older versions of rsync, so you may wish to try upgrading and
38 see if you now get sent the error message from the remote rsync.
39
40 <p>There are several common causes for a remote rsync process going away:
41
42 <ul>
43
44 <li>The destination disk is full (remember that you need at least the
45 size of the largest file that needs to be updated available in free
46 disk space for the transfer to succeed).
47
48 <li>A network error caused the connection to be dropped.
49
50 <li>The remote rsync executable wasn't found.
51
52 <li>Your remote-shell setup isn't working right or isn't "clean"
53 (i.e. it is sending spurious text to rsync).
54
55 </ul>
56
57 <p>If you can't figure out why the failure happened, there are steps
58 you can take to debug the situation.  One way is to create a shell
59 script on the remote system such as
60 <a href="rsync-debug">this one named "rsync-debug"</a>.
61 You would use the script like this:
62
63 <pre>rsync -av --rsync-path=/some/path/rsync-debug HOST:SOURCE DEST
64 rsync -av --rsync-path=/some/path/rsync-debug SOURCE HOST:DEST
65 </pre>
66
67 <p>This script enables core dumps and also logs all the OS system calls
68 that lead up to the failure to a file in the /tmp dir.  You can use the
69 resulting files to help figure out why the remote rsync failed.
70
71 <p>If you are rsyncing to an rsync daemon, the above script won't have
72 any effect.  Instead, halt the current daemon and run a debug version
73 with core-dumps enabled and (if desired) using a
74 system-call tracing utility such as <i>strace</i>, <i>truss</i>, or
75 <i>tusc</i>.  For strace, you would do it like this (the -f option
76 tells strace to follow the child processes too):
77
78 <pre>ulimit -c unlimited
79 strace -f rsync --daemon --no-detach 2&gt;/tmp/rsync-$$.out
80 </pre>
81
82 <p>Then, use a separate window to actually run the failing transfer, after
83 which you can kill the debug rsync daemon (pressing Ctrl-C should do it).
84
85 <p>If you are using rsync under inetd, I'd suggest temporarily disabling
86 that and using the above daemon approach to debug what is going on.
87
88 <li><p><b>Q:</b>
89
90 When connecting to an rsync daemon (using the "::" syntax) the
91 connection fails immediately with an error like this:
92
93 <pre>rsync: connection unexpectedly closed (24 bytes read so far)
94 rsync error: error in rsync protocol data stream (code 12) at io.c(342)
95 </pre>
96
97 <p><b>A:</b>
98
99 Older rsync daemons (before 2.6.3) were unable to return errors that were
100 generated during the option-parsing phase of the transfer.  Look in the
101 logfile on the server to see if an error was reported, such as a "refused"
102 option, an option that the server rsync doesn't support (e.g.  perhaps
103 links are not supported by the server), or some other failure (such as
104 trying to send data to a read-only module).  Upgrading the version of rsync
105 that is running as a daemon to at least 2.6.3 will allow these errors to
106 get returned to all rsync clients, old or new alike.
107
108 <li><p><b>Q:</b>
109
110 Using --dry-run (-n) doesn't show all changed directories.
111
112 <p><b>A:</b>
113
114 Correct.  Rsync shows most other changes, but some directory changes are
115 not currently described in --dry-run mode.  Hopefully a future version
116 will fix this.
117
118 <li><p><b>Q:</b>
119
120 Aren't there more issues than this?
121
122 <p><b>A:</b>
123
124 Yes.  You can find some of them in the <a href="/ftp/rsync/TODO">TODO file</a> or
125 <a href="https://bugzilla.samba.org/buglist.cgi?product=rsync&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED">search the bugzilla database</a>.
126
127 </ol>
128
129 <!--#include virtual="footer.html" -->