Added a source for sparc/solaris binaries.
[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 Rsync appears hung -- what should I do?
15
16 <p><b>A:</b>
17
18 When experiencing a hang or freeze <b>please</b> gather the following
19 information before killing the rsync process:
20
21 <ul>
22
23 <li> The state of the send/receive queues shown with netstat on the two ends.
24
25 <li> The system call that each of the 3 processes is stuck in (use truss on
26 solaris, strace on Linux, etc.).
27
28 </ul>
29
30 <p>See the "rsync-debug" script below for an example of how to grab strace
31 information from the remote rsync process(es).  If you need help, send email to
32 the mailing list. 
33
34 <li><p><b>Q:</b>
35
36 Why does my chrooted rsync daemon crash when doing an LDAP lookup for a user or
37 group?
38
39 <p><b>A:</b>
40
41 There is a bug in some LDAP libraries (e.g. Fedora Core 3) where it crashes
42 when someone looks up a name from inside a chrooted process (one that does not
43 contain copies of the libraries to perform the lookup).  This is a bug that the
44 LDAP libraries will need to fix, and is out of rsync's hands.  You can work
45 around the problem by using the --numeric-ids option, turning chroot off, or
46 getting rid of LDAP lookups.
47
48 <li><p><b>Q:</b>
49
50 Why does my transfer die with something like the following error?
51
52 <pre>rsync: error writing 4 unbuffered bytes - exiting: Broken pipe
53 rsync error: error in rsync protocol data stream (code 12) at io.c(463)
54 </pre>
55
56 <p>or
57
58 <pre>rsync: connection unexpectedly closed (24 bytes read so far)
59 rsync error: error in rsync protocol data stream (code 12) at io.c(342)
60 </pre>
61
62 <p><b>A:</b>
63
64 This error tells you that the local rsync was trying to talk to the remote
65 rsync, but the connection to that rsync is now gone.  The thing you must
66 figure out is <b>why</b>, and that can involve some investigative work.
67
68 <p>If the remote rsync is a daemon, your first step should be to look at
69 the daemon's log file to see if it logged an error explaining why it
70 aborted the transfer.
71
72 <p>Beginning with version 2.6.3, rsync now does a better job of retreiving
73 the error from the remote
74 process than older versions of rsync, so you may wish to try upgrading and
75 see if you now get sent the error message from the remote rsync.
76
77 <p>There are several common causes for a remote rsync process going away:
78
79 <ul>
80
81 <li>The destination disk is full (remember that you need at least the
82 size of the largest file that needs to be updated available in free
83 disk space for the transfer to succeed).
84
85 <li>A network error caused the connection to be dropped.
86
87 <li>The remote rsync executable wasn't found.
88
89 <li>Your remote-shell setup isn't working right or isn't "clean"
90 (i.e. it is sending spurious text to rsync).
91
92 </ul>
93
94 <p>If you can't figure out why the failure happened, there are steps
95 you can take to debug the situation.  One way is to create a shell
96 script on the remote system such as
97 <a href="rsync-debug">this one named "rsync-debug"</a>.
98 You would use the script like this:
99
100 <pre>rsync -av --rsync-path=/some/path/rsync-debug HOST:SOURCE DEST
101 rsync -av --rsync-path=/some/path/rsync-debug SOURCE HOST:DEST
102 </pre>
103
104 <p>This script enables core dumps and also logs all the OS system calls
105 that lead up to the failure to a file in the /tmp dir.  You can use the
106 resulting files to help figure out why the remote rsync failed.
107
108 <p>If you are rsyncing directly to an rsync daemon (without using a
109 remote-shell transport), the above script won't have
110 any effect.  Instead, halt the current daemon and run a debug version
111 with core-dumps enabled and (if desired) using a
112 system-call tracing utility such as <i>strace</i>, <i>truss</i>, or
113 <i>tusc</i>.  For strace, you would do it like this (the -f option
114 tells strace to follow the child processes too):
115
116 <pre>ulimit -c unlimited
117 strace -f rsync --daemon --no-detach 2&gt;/tmp/rsync-$$.out
118 </pre>
119
120 <p>Then, use a separate window to actually run the failing transfer, after
121 which you can kill the debug rsync daemon (pressing Ctrl-C should do it).
122
123 <p>If you are using rsync under inetd, I'd suggest temporarily disabling
124 that and using the above daemon approach to debug what is going on.
125
126 <li><p><b>Q:</b>
127
128 Why does my connection to an rsync daemon (using the "::" syntax)
129 fail immediately with an error like the following?
130
131 <pre>rsync: connection unexpectedly closed (24 bytes read so far)
132 rsync error: error in rsync protocol data stream (code 12) at io.c(342)
133 </pre>
134
135 <p><b>A:</b>
136
137 Older rsync daemons (before 2.6.3) were unable to return errors that were
138 generated during the option-parsing phase of the transfer.  Look in the
139 logfile on the server to see if an error was reported, such as a "refused"
140 option, an option that the server rsync doesn't support (e.g.  perhaps
141 links are not supported by the server), or some other failure (such as
142 trying to send data to a read-only module).  Upgrading the version of rsync
143 that is running as a daemon to at least 2.6.3 will allow these errors to
144 get returned to all rsync clients, old or new alike.
145
146 <li><p><b>Q:</b>
147
148 Why doesn't --dry-run (-n) show all the changed directories?
149
150 <p><b>A:</b>
151
152 This was a bug in versions prior to 2.6.4.  Upgrade both rsync versions (or at
153 least the receiving side).
154
155 <li><p><b>Q:</b>
156
157 Aren't there more issues than this?
158
159 <p><b>A:</b>
160
161 Yes.  You can find some of them in the <a href="/ftp/rsync/TODO">TODO file</a> or
162 <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>.
163
164 </ol>
165
166 <!--#include virtual="footer.html" -->