Wayne,

I am running an rsyncd on my backup host - I now think the problem is NOT the firewall (complicated: originally port 873 was blocked elsewhere). Now I get the same problem with or without the firewall and at the client end I get this:

rsync: connection unexpectedly closed (196 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

At the server end I get this in the logs:

2005/02/15 11:24:09 [27494] rsync to archive/matt_incs/Wednesday from [EMAIL PROTECTED] (82.10.91.56)
2005/02/15 11:24:09 [27495] wrote 196 bytes read 146 bytes total size 0
2005/02/15 11:24:10 [27496] rsync to archive/matt from [EMAIL PROTECTED] (82.10.91.56)


So no error at the server end.


Now this previously worked for 2 years until last week. Last week we install FC2 on the server,
installed a firewall with iptables and moved the disks around. At the client end nothing has changed.


Since the error persists with or without the firewall we think we have eliminated it from the problem.

Working from the advice in: http://samba.anu.edu.au/rsync/issues.html

(1) disk space? there is plenty of space on disks at both ends
   (df /dev/hdb2             74864892  15374792  55687116  22% /optics)
(2) network error? - unlikely as it worked before updating the system
(3) rysnc executable missing? It is there
(4) remote shell issues - not relevant to daemon

Following the advice about tracing the system calls using:

ulimit -c unlimited
strace -f rsync --daemon --no-detach 2>/tmp/rsync-$$.out

I did this and got (boring bits deleted)

[pid 27864] stat64("/usr/lib/i686", 0xfef74ac8) = -1 ENOENT (No such file or directory)
[pid 27864] open("/usr/lib/libnss_compat.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 27864] stat64("/usr/lib", 0xfef74ac8) = -1 ENOENT (No such file or directory)
[pid 27864] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 27864 detached
<... select resumed> ) = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, NULL, WNOHANG) = 27864
waitpid(-1, NULL, WNOHANG) = -1 ECHILD (No child processes)
rt_sigaction(SIGCHLD, {0x805e2a0, [CHLD], SA_RESTART}, {0x805e2a0, [CHLD], SA_RESTART}, 8) = 0
sigreturn() = ? (mask now [])
select(6, [4 5], NULL, NULL, [EMAIL PROTECTED] root]#



And I have no idea what this all means...

If you look at my script (below) you can see rsync runs 3 times, the first 2 passes run fine, the thrid always fails.

Any advice?

SA

Below my clinet side script:

#!/bin/tcsh

# backup your trouble script with incremental backups
# provides 6 days notice against disasters


date > /home/matt/.backup_date

set OPTIONS = " -vaz --stats --delete --delete-excluded --exclude-from .mirror.excludes --backup --temp-dir /tmp"
set DAY = `date +%A`
set EMPTY = "/tmp/backupyourtroublesempty/"
echo Throttling the network to enhance interactive response
throttle_net
setenv RSYNC_PASSWORD censored


echo Today is $DAY
set LAST="UNKNOWN"

if( $DAY == 'Monday' ) then
       set LAST="Tuesday"
       endif
if( $DAY == 'Tuesday' ) then
       set LAST="Wednesday"
       endif
if( $DAY == 'Wednesday' ) then
       set LAST="Thursday"
       endif
if( $DAY == 'Thursday' ) then
       set LAST="Friday"
       endif
if( $DAY == 'Friday' ) then
       set LAST="Saturday"
       endif
if( $DAY == 'Saturday' ) then
       set LAST="Sunday"
       endif
if( $DAY == 'Sunday' ) then
       set LAST="Monday"
       endif

echo The oldest incremental backup is $LAST

echo Deleting incremental ${LAST} with
echo rsync --delete -a $EMPTY [EMAIL PROTECTED]::archive/matt_incs/$LAST

[ -d $EMPTY ] || mkdir $EMPTY
rsync --delete -a $EMPTY [EMAIL PROTECTED]::archive/matt_incs/$LAST
rmdir $EMPTY

echo Starting main backup with incremental backup for $DAY

if { nice +20 rsync $OPTIONS /home/matt/ [EMAIL PROTECTED]::archive/matt --backup-dir=/matt_incs/$DAY } then
echo "."
echo " ."
echo " ."
echo Backup was probably successful!
echo " ."
echo " ."
echo "."
sleep 10
else
echo " "
echo " "
echo BACKUP ERROR ! Tell Matt!
echo " "
echo " "
echo "EEEEEEE RRRRRR RRRRRR OOOOOO RRRRRR"
echo "E R R R R O O R R"
echo "E R R R R O O R R"
echo "E R R R R O O R R"
echo "EEEEEE RRRRR RRRRR O O RRRRRR"
echo "E R R R R O O R R"
echo "E R R R R O O R R"
echo "E R R R R O O R R"
echo "EEEEEE R R R R OOOOOO R R"
echo " "
echo " "
echo " "
echo " "
echo "This message will stay for 1hr, type cntl-c to get rid of it"
date > /home/matt/.backup_error
sleep 3600
endif
echo Finished backup
echo Releasing the network throttle
unthrottle_net




From: Wayne Davison <[EMAIL PROTECTED]>
To: david blunkett <[EMAIL PROTECTED]>
CC: rsync@lists.samba.org
Subject: Re: rsyncd / firewall
Date: Mon, 14 Feb 2005 16:33:55 -0800

On Mon, Feb 14, 2005 at 11:45:07PM +0000, david blunkett wrote:
> If I have a firewall it doesn't work - just times out.  This problem
> occurs <even> if I open port 873.

Are you connecting to a daemon or using a remote shell?  While the
daemon protocol does use port 873 (only), a remote shell uses its own
port, such as ssh's port 22.

..wayne..

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to