[Csync2] 'Format-error while receiving data' at file conflict.

Nils Stöckmann N.Stoeckmann at demetec.de
Thu Sep 20 16:06:48 CEST 2012


Hello,

I have a problem using csync. After a few actions, including removing a
#comment from csync2.cfg and changing the cron table, csync2 does not
sync any more and yields the unuseful error message "'Format-error while
receiving data"

running csync2 on host leihnix6h1 leads to the following error message:

> Connecting to host leihnix5h1-eth1 (PLAIN) ...
> Local> CONFIG \n
> Peer> OK (cmd_finished).\n
> Local> HELLO leihnix6h1-eth1\n
> Peer> OK (cmd_finished).\n
> Match (+): /etc on /etc/cron.d/csync2
> Updating /etc/cron.d/csync2 on leihnix5h1-eth1 ...
> Local> FLUSH
> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg
> /etc/cron.d/csync2\n
> Peer> OK (cmd_finished).\n
> Local> PATCH
> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg
> /etc/cron.d/csync2\n
> Peer> OK (send_data).\n
> Csync2 / Librsync: csync_rs_delta('/etc/cron.d/csync2')
> Receiving sig_file from peer..
> Peer> octet-stream 24\n
> Receiving 24 bytes ..
> Peer>
> rs\0016\000\000\010\000\000\000\000\010\232;\355\3225\017E\213&v\263\037
> Got 24 bytes, 0 bytes left ..
> Opening new_file and delta_file..
> Running rs_build_hash_table() from librsync..
> Running rs_delta_file() from librsync..
> Sending delta_file to peer..
> Local> octet-stream 9\n
> Local> rs\0026F\000\004b\000
> Delta has been created successfully.
> Peer> Updated /etc/cron.d/csync2 from leihnix6h1-eth1.\n
> While syncing file /etc/cron.d/csync2:
> ERROR from peer leihnix5h1-eth1: Updated /etc/cron.d/csync2 from
> leihnix6h1-eth1.
> File stays in dirty state. Try again later...
> Match (+): /etc on /etc/puppet/manifests/hosts.pp
> Updating /etc/puppet/manifests/hosts.pp on leihnix5h1-eth1 ...
> Local> SIG
> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg
> /etc/puppet/manifests/hosts.pp\n
> Peer> OK (cmd_finished).\n
> Peer> OK (not_found).\n
> File is different on peer (cktxt char #0).
> >>> PEER:  OK (not_found).
> >>> LOCAL: v1:mtime=0:mode=33188:uid=0:gid=0:type=reg:size=156
> Csync2 / Librsync: csync_rs_check('/etc/puppet/manifests/hosts.pp', 1
> [regular file])
> Opening basis_file and sig_file..
> Running rs_sig_file() from librsync....
> Reading signature size from peer....
> Peer> ---\n
> Format-error while receiving data.
> SQL: COMMIT TRANSACTION
running on leihnix5h1 however leads to "all OK":
> SQL: SELECT peername FROM dirty GROUP BY peername ORDER BY random()
> SQL Query finished.
> SQL: SELECT command, logfile FROM action GROUP BY command, logfile
> SQL Query finished.
> SQL: COMMIT TRANSACTION
> Finished with 0 errors.


csync2 -T on leihnix6h1:
X       leihnix5h1-eth1 leihnix6h1-eth1 /etc/cron.d/csync2
L       leihnix5h1-eth1 leihnix6h1-eth1 /etc/puppet/manifests/hosts.pp
L       leihnix5h1-eth1 leihnix6h1-eth1 /etc/puppet/manifests/nodes.pp



For the cron.d/csync2 an auto-resolve rule is in place, however it
doesn't work. (I don't know why).
Using csync2 -f /etc/cron.d/csync2 didn't help it, either.


My config file is:
> nossl 172.31.* 172.31.*;
> nossl leihnix*h* leihnix*h*;
> nossl leihnix*h* 172.31*;
> group cfg_sync-etc {
>         host leihnix6h1 at leihnix6h1-eth1;
>         host leihnix5h1 at leihnix5h1-eth1;
>         #bzw mit mehreren netzwerkkarten, wenn die namensauoesung den
> hostname nicht fuer die sync-ip liefert
>         #host hostname@{other-nostname/ip}
>         key     /etc/csync2/cfg_sync-etc.key;
>
>
>         include /etc/;
>         include /boot/;
>         include /root/;
>
>         exclude /etc/.hg/;
>         exclude /etc/apparmor.d/cache/;
>         exclude /etc/lvm/;
>         exclude /etc/Mirror/;
>         exclude /etc/ssl/private/;
>
>         exclude /etc/corosync/corosync.conf;
>         exclude /etc/init.d/.depend.*;
>         exclude /etc/initramfs-tools/conf.d/resume;
>         exclude /etc/network/interfaces;
>         exclude /etc/network/run;
>         exclude /etc/openvpn/leihnix*;
>         exclude /etc/ssh/ssh_host*;
>         exclude /etc/udev/rules.d/*-persistent*;
>
>         exclude /etc/.etckeeper;
>         exclude /etc/adjtime;
>         exclude /etc/csync2_ssl*;
>         exclude /etc/fstab;
>         exclude /etc/hostname;
>         exclude /etc/mtab;
>         exclude /etc/mtab.fuselock;
>         exclude /etc/nologin;
>         exclude /etc/rc.local;
>
>         exclude /boot/grub/grub.cfg;
>
>         exclude /root/.ssh/known_hosts;
>         exclude /root/.rnd;
>
>         exclude *.cache;
>         exclude *.log;
>         exclude *_history;
>
>
>         auto younger;
>
>         backup-directory /mnt/backup/csync2/cfg_sync-etc/;
>         backup-generations 4;
> }


Do you have an idea how to circumvent the "format error" ?

Regards

Nils



More information about the Csync2 mailing list