BackupPC-users

Re: [BackupPC-users] problems with linux host - Unable to read 4 bytes

2009-06-22 17:40:15
Subject: Re: [BackupPC-users] problems with linux host - Unable to read 4 bytes
From: Holger Parplies <wbppc AT parplies DOT de>
To: Nick Smith <nick.smith79 AT gmail DOT com>
Date: Mon, 22 Jun 2009 23:33:30 +0200
Hi,

Nick Smith wrote on 2009-06-22 15:35:13 -0400 [[BackupPC-users] problems with 
linux host - Unable to read 4 bytes]:
> The error message as you all know im sure:

no, we didn't know. I'll mark the relevant line:

> full backup started for directory /
> Running: /usr/bin/ssh -q -x -p 22200 -l root webserver /usr/bin/rsync
> --server --sender --numeric-ids --perms --owner --group -D --links
> --hard-links --times --block-size=2048 --recursive --ignore-times . /
> Xfer PIDs are now 16974
> Rsync command pid is 16974
> Read EOF: Connection reset by peer
            ^^^^^^^^^^^^^^^^^^^^^^^^
> Tried again: got 0 bytes
> Done: 0 files, 0 bytes
> Got fatal error during xfer (Unable to read 4 bytes)
> Backup aborted (Unable to read 4 bytes)

Also important, but "connection reset by peer" really says more about the
cause.

> Communication working both directions.
> root@backup-server:/root/.ssh# ssh -p 22200 -l root webserver whoami
> root

Just to confirm what the others have already pointed out: you need to initiate
the ssh connection as backuppc user, because that's what happens when BackupPC
does it. Here, you are using the identity file in ~root/.ssh/identity (or
id_rsa or whatever), as backuppc user, it's ~backuppc/.ssh/identity (or ...).
Also, if the public key is not in /etc/ssh/ssh_known_hosts, either
~root/.ssh/known_hosts or ~backuppc/.ssh/known_hosts (or possibly
known_hosts2) is checked (and if the key is in one of them but not the other,
the other user will still be asked to accept it).

> root@server:~# ssh -p 22252 -l root backup-server whoami
> root

Yes, this one is irrelevant, or perhaps even unwise. Do you *want* root on the
client(s) to be backed up to have passwordless access to the BackupPC server?
You don't need it for BackupPC to work, so don't enable it unless you are sure
you want to.

> The strange thing is the first server i setup works fine, which was
> running centos.
> This one that has been giving me fits all day is running ubuntu just
> like the backuppc box.
> 
> Ive been working on this for the last 4 hours and everything on google
> seems to point to bad ssh keys, which seems to be working, just not
> from backuppc.

I had this once, too, and it was caused by not having installed rsync on the
client machine. It's not a required package (at least in Debian), though I
would argue that every UNIX machine should have it. If rsync is not installed,
you can't execute /usr/bin/rsync, which is no surprise, once you've found the
cause. Before that, it is :-).

Regards,
Holger

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/