Changed the background color for one table element.
[rsync-web.git] / issues.html
index 7b8fc565a44374d044ce5342c92906c17804ee74..7821e1381ca19231b004a6f14abe30c7a86f61aa 100644 (file)
@@ -5,7 +5,7 @@
 </HEAD>
 <!--#include virtual="header.html" -->
 
-<H2 align="center">Current issues</H2>
+<H2 align="center">current issues and debugging</H2>
 
 <ol>
 
@@ -25,22 +25,39 @@ rsync error: error in rsync protocol data stream (code 12) at io.c(342)
 
 <p><b>A:</b>
 
-Sometimes fatal error messages from the remote machine can be lost on
-the way to the client or the remote process may have died; you should
-investigate on the server for something stopping the transmission.
-Several common causes:
+This error tells you that the local rsync was trying to talk to the remote
+rsync, but the connection to that rsync is now gone.  The thing you must
+figure out is <b>why</b>, and that can involve some investigative work.
+
+<p>If the remote rsync is a daemon, your first step should be to look at
+the daemon's log file to see if it logged an error explaining why it
+aborted the transfer.
+
+<p>Rsync 2.6.3 does a better job of retreiving the error from the remote
+process than older versions of rsync, so you may wish to try upgrading and
+see if you now get sent the error message from the remote rsync.
+
+<p>There are several common causes for a remote rsync process going away:
 
 <ul>
-<li>The destination disk is full.
+
+<li>The destination disk is full (remember that you need at least the
+size of the largest file that needs to be updated available in free
+disk space for the transfer to succeed).
+
+<li>A network error caused the connection to be dropped.
+
 <li>The remote rsync executable wasn't found.
+
 <li>Your remote-shell setup isn't working right or isn't "clean"
-(i.e. is sending spurious text to rsync).
+(i.e. it is sending spurious text to rsync).
+
 </ul>
 
-<p>If you think you've found a bug, you'll need to help track down the
-cause of the failure (since the above errors just tell us that something
-went wrong remotely, not what went wrong).  One way is to create a shell
-script such as <a href="rsync-debug">this one named rsync-debug</a>.
+<p>If you can't figure out why the failure happened, there are steps
+you can take to debug the situation.  One way is to create a shell
+script on the remote system such as
+<a href="rsync-debug">this one named "rsync-debug"</a>.
 You would use the script like this:
 
 <pre>rsync -av --rsync-path=/some/path/rsync-debug HOST:SOURCE DEST
@@ -51,6 +68,23 @@ rsync -av --rsync-path=/some/path/rsync-debug SOURCE HOST:DEST
 that lead up to the failure to a file in the /tmp dir.  You can use the
 resulting files to help figure out why the remote rsync failed.
 
+<p>If you are rsyncing to an rsync daemon, the above script won't have
+any effect.  Instead, halt the current daemon and run a debug version
+with core-dumps enabled and (if desired) using a
+system-call tracing utility such as <i>strace</i>, <i>truss</i>, or
+<i>tusc</i>.  For strace, you would do it like this (the -f option
+tells strace to follow the child processes too):
+
+<pre>ulimit -c unlimited
+strace -f rsync --daemon --no-detach 2&gt;/tmp/rsync-$$.out
+</pre>
+
+<p>Then, use a separate window to actually run the failing transfer, after
+which you can kill the debug rsync daemon (pressing Ctrl-C should do it).
+
+<p>If you are using rsync under inetd, I'd suggest temporarily disabling
+that and using the above daemon approach to debug what is going on.
+
 <li><p><b>Q:</b>
 
 When connecting to an rsync daemon (using the "::" syntax) the
@@ -62,12 +96,14 @@ rsync error: error in rsync protocol data stream (code 12) at io.c(342)
 
 <p><b>A:</b>
 
-Older rsync daemons (pre 2.6.3) were unable to return errors that were
+Older rsync daemons (before 2.6.3) were unable to return errors that were
 generated during the option-parsing phase of the transfer.  Look in the
-logfile on the server to see if an error was reported, such as a
-"refused" option, an option that the server rsync doesn't support (e.g.
-perhaps links are not supported by the server), or some other failure
-(such as trying to send data to a read-only module).
+logfile on the server to see if an error was reported, such as a "refused"
+option, an option that the server rsync doesn't support (e.g.  perhaps
+links are not supported by the server), or some other failure (such as
+trying to send data to a read-only module).  Upgrading the version of rsync
+that is running as a daemon to at least 2.6.3 will allow these errors to
+get returned to all rsync clients, old or new alike.
 
 <li><p><b>Q:</b>