<div>i noticed that this error occurs when :</div>
<div> </div>
<ul>
<li>the backup directory configured in csync2.cfg does not exist [or may be permissions issue]</li>
<li>a file is modified on primary which when csync2 attempted to sync to the peer found that the directory which this file needs to be synced is either not present or have been deleted</li>
<li>or a sub-directory gets deleted on the master and hence csync2 fails to sync the deletion to peer</li></ul>
<div> I have submitted a patch to fix this issue and it is being reviewed/committed</div>
<div> </div>
<div>A few days ago Lars have shared a git address which contains a fix for this issue; it would be great if you can check it out and verify if your issue gets fixed.</div>
<div> </div>
<div>Regards,<br>Samba</div>
<div> </div>
<div>=================================================================================================================</div>
<div class="gmail_quote">On Thu, Sep 20, 2012 at 7:36 PM, Nils Stöckmann <span dir="ltr"><<a href="mailto:N.Stoeckmann@demetec.de" target="_blank">N.Stoeckmann@demetec.de</a>></span> wrote:
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hello,
<div> </div>
<div>I have a problem using csync. After a few actions, including removing a</div>
<div>#comment from csync2.cfg and changing the cron table, csync2 does not</div>
<div>sync any more and yields the unuseful error message "'Format-error while</div>
<div>receiving data"</div>
<div> </div>
<div>running csync2 on host leihnix6h1 leads to the following error message:</div>
<div> </div>
<div>> Connecting to host leihnix5h1-eth1 (PLAIN) ...</div>
<div>> Local> CONFIG \n</div>
<div>> Peer> OK (cmd_finished).\n</div>
<div>> Local> HELLO leihnix6h1-eth1\n</div>
<div>> Peer> OK (cmd_finished).\n</div>
<div>> Match (+): /etc on /etc/cron.d/csync2</div>
<div>> Updating /etc/cron.d/csync2 on leihnix5h1-eth1 ...</div>
<div>> Local> FLUSH</div>
<div>> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg</div>
<div>> /etc/cron.d/csync2\n</div>
<div>> Peer> OK (cmd_finished).\n</div>
<div>> Local> PATCH</div>
<div>> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg</div>
<div>> /etc/cron.d/csync2\n</div>
<div>> Peer> OK (send_data).\n</div>
<div>> Csync2 / Librsync: csync_rs_delta('/etc/cron.d/csync2')</div>
<div>> Receiving sig_file from peer..</div>
<div>> Peer> octet-stream 24\n</div>
<div>> Receiving 24 bytes ..</div>
<div>> Peer></div>
<div>> rs\0016\000\000\010\000\000\000\000\010\232;\355\3225\017E\213&v\263\037</div>
<div>> Got 24 bytes, 0 bytes left ..</div>
<div>> Opening new_file and delta_file..</div>
<div>> Running rs_build_hash_table() from librsync..</div>
<div>> Running rs_delta_file() from librsync..</div>
<div>> Sending delta_file to peer..</div>
<div>> Local> octet-stream 9\n</div>
<div>> Local> rs\0026F\000\004b\000</div>
<div>> Delta has been created successfully.</div>
<div>> Peer> Updated /etc/cron.d/csync2 from leihnix6h1-eth1.\n</div>
<div>> While syncing file /etc/cron.d/csync2:</div>
<div>> ERROR from peer leihnix5h1-eth1: Updated /etc/cron.d/csync2 from</div>
<div>> leihnix6h1-eth1.</div>
<div>> File stays in dirty state. Try again later...</div>
<div>> Match (+): /etc on /etc/puppet/manifests/hosts.pp</div>
<div>> Updating /etc/puppet/manifests/hosts.pp on leihnix5h1-eth1 ...</div>
<div>> Local> SIG</div>
<div>> 9J__lVm7tSQ1dOKVoSOLoIMzTdBOP9FritdZi4m2fA7xsYtb5HxDYzXGcJBROrCg</div>
<div>> /etc/puppet/manifests/hosts.pp\n</div>
<div>> Peer> OK (cmd_finished).\n</div>
<div>> Peer> OK (not_found).\n</div>
<div>> File is different on peer (cktxt char #0).</div>
<div>> >>> PEER: OK (not_found).</div>
<div>> >>> LOCAL: v1:mtime=0:mode=33188:uid=0:gid=0:type=reg:size=156</div>
<div>> Csync2 / Librsync: csync_rs_check('/etc/puppet/manifests/hosts.pp', 1</div>
<div>> [regular file])</div>
<div>> Opening basis_file and sig_file..</div>
<div>> Running rs_sig_file() from librsync....</div>
<div>> Reading signature size from peer....</div>
<div>> Peer> ---\n</div>
<div>> Format-error while receiving data.</div>
<div>> SQL: COMMIT TRANSACTION</div>
<div>running on leihnix5h1 however leads to "all OK":</div>
<div>> SQL: SELECT peername FROM dirty GROUP BY peername ORDER BY random()</div>
<div>> SQL Query finished.</div>
<div>> SQL: SELECT command, logfile FROM action GROUP BY command, logfile</div>
<div>> SQL Query finished.</div>
<div>> SQL: COMMIT TRANSACTION</div>
<div>> Finished with 0 errors.</div>
<div> </div>
<div> </div>
<div>csync2 -T on leihnix6h1:</div>
<div>X leihnix5h1-eth1 leihnix6h1-eth1 /etc/cron.d/csync2</div>
<div>L leihnix5h1-eth1 leihnix6h1-eth1 /etc/puppet/manifests/hosts.pp</div>
<div>L leihnix5h1-eth1 leihnix6h1-eth1 /etc/puppet/manifests/nodes.pp</div>
<div> </div>
<div> </div>
<div> </div>
<div>For the cron.d/csync2 an auto-resolve rule is in place, however it</div>
<div>doesn't work. (I don't know why).</div>
<div>Using csync2 -f /etc/cron.d/csync2 didn't help it, either.</div>
<div> </div>
<div> </div>
<div>My config file is:</div>
<div>> nossl 172.31.* 172.31.*;</div>
<div>> nossl leihnix*h* leihnix*h*;</div>
<div>> nossl leihnix*h* 172.31*;</div>
<div>> group cfg_sync-etc {</div>
<div>> host leihnix6h1@leihnix6h1-eth1;</div>
<div>> host leihnix5h1@leihnix5h1-eth1;</div>
<div>> #bzw mit mehreren netzwerkkarten, wenn die namensauoesung den</div>
<div>> hostname nicht fuer die sync-ip liefert</div>
<div>> #host hostname@{other-nostname/ip}</div>
<div>> key /etc/csync2/cfg_sync-etc.key;</div>
<div>></div>
<div>></div>
<div>> include /etc/;</div>
<div>> include /boot/;</div>
<div>> include /root/;</div>
<div>></div>
<div>> exclude /etc/.hg/;</div>
<div>> exclude /etc/apparmor.d/cache/;</div>
<div>> exclude /etc/lvm/;</div>
<div>> exclude /etc/Mirror/;</div>
<div>> exclude /etc/ssl/private/;</div>
<div>></div>
<div>> exclude /etc/corosync/corosync.conf;</div>
<div>> exclude /etc/init.d/.depend.*;</div>
<div>> exclude /etc/initramfs-tools/conf.d/resume;</div>
<div>> exclude /etc/network/interfaces;</div>
<div>> exclude /etc/network/run;</div>
<div>> exclude /etc/openvpn/leihnix*;</div>
<div>> exclude /etc/ssh/ssh_host*;</div>
<div>> exclude /etc/udev/rules.d/*-persistent*;</div>
<div>></div>
<div>> exclude /etc/.etckeeper;</div>
<div>> exclude /etc/adjtime;</div>
<div>> exclude /etc/csync2_ssl*;</div>
<div>> exclude /etc/fstab;</div>
<div>> exclude /etc/hostname;</div>
<div>> exclude /etc/mtab;</div>
<div>> exclude /etc/mtab.fuselock;</div>
<div>> exclude /etc/nologin;</div>
<div>> exclude /etc/rc.local;</div>
<div>></div>
<div>> exclude /boot/grub/grub.cfg;</div>
<div>></div>
<div>> exclude /root/.ssh/known_hosts;</div>
<div>> exclude /root/.rnd;</div>
<div>></div>
<div>> exclude *.cache;</div>
<div>> exclude *.log;</div>
<div>> exclude *_history;</div>
<div>></div>
<div>></div>
<div>> auto younger;</div>
<div>></div>
<div>> backup-directory /mnt/backup/csync2/cfg_sync-etc/;</div>
<div>> backup-generations 4;</div>
<div>> }</div>
<div> </div>
<div> </div>
<div>Do you have an idea how to circumvent the "format error" ?</div>
<div> </div>
<div>Regards</div>
<div> </div>
<div>Nils</div>
<div> </div>
<div>_______________________________________________</div>
<div>Csync2 mailing list</div>
<div><a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a></div>
<div><a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a></div>
<div> </div></blockquote></div>
<div> </div>