Hotsync trouble

NethServer Version: 7.9
Module: nethserver-hotsync

My main Neth system is in a Contabo VPS, and I have a local Neth VM set up as a hotsync target. At some point last night, my local VM went wonky, so I restored it from its backup from the night before. Hotsync will fill in any discrepancies, right?

Wrong. I restored the local VM, logged in as root, and ran yum upgrade (since I hadn’t installed updates in a while). Now I’m getting this email every 15 minutes from my main system:

hotsync error: rsync returned 2. rsync output:
ERROR: rejecting excluded file-list name: var/lib/nethserver/backup
rsync error: protocol incompatibility (code 2) at flist.c(907) [receiver=3.1.2]
rsync error: protocol incompatibility (code 2) at io.c(1640) [generator=3.1.2]

I’ve run signal-event nethserver-hotsync-update on both systems. Here’s the output of config show hotsync on the master:

[root@neth ~]# config show hotsync
hotsync=configuration
    MasterHost=
    SlaveHost=192.168.1.82
    SlavePort=273
    databases=enabled
    role=master
    status=enabled

…and on the slave:

hotsync=configuration
    MasterHost=192.168.3.100
    SlaveHost=
    SlavePort=273
    databases=enabled
    role=slave
    status=enabled

rpm -q returns the same version on both systems:

[root@neth ~]# rpm -q nethserver-hotsync
nethserver-hotsync-2.2.4-1.ns7.noarch

Not sure what to check from here–any ideas?

Maybe not.

This means that you simply had a restore? Or go reinstall + restore from last backup?

I restored the VM. I run a nightly backup of all my VMs to a backup server, which takes a complete (virtual) disk image as of that time. I restored the backup from Thursday night.

I’ve not much experienced with hostsync but from the docs, did you try to run hotsync command on the master to force a synchronization from master to slave?

Can you check if rsync version is the same on master and slave?
OK, the log you posted shows it is the same…

I hadn’t; let’s see what happens there:

[root@neth ~]# hotsync
===== Report for configuration backup =====
Backup started at 2022-10-22 11:59:47
Event pre-backup-config: SUCCESS
Action backup-config-execute: SUCCESS
Event post-backup-config: SUCCESS
Backup status: SUCCESS
Backup ended at 2022-10-22 11:59:51
Time elapsed: 0 hours, 0 minutes, 4 seconds
hotsync error: rsync returned 2. rsync output:
ERROR: rejecting excluded file-list name: var/lib/nethserver/backup
rsync error: protocol incompatibility (code 2) at flist.c(907) [receiver=3.1.2]
rsync error: protocol incompatibility (code 2) at io.c(1640) [generator=3.1.2]

I almost forgot about a similar problem related to redhat patches on rsync (downgrade didn’t work at first for that case, until a reboot):

3 Likes

Bingo. yum downgrade rsync followed by signal-event nethserver-hotsync-update on both machines, then ran hotsync again on the master:

[root@neth ~]# hotsync
===== Report for configuration backup =====
Backup started at 2022-10-22 12:23:19
Event pre-backup-config: SUCCESS
Action backup-config-execute: SUCCESS
Event post-backup-config: SUCCESS
Backup status: SUCCESS
Backup ended at 2022-10-22 12:23:26
Time elapsed: 0 hours, 0 minutes, 7 seconds
1 Like

then hotsync should handle better updated rync?

There is a recent rsync update (rsync.x86_64 0:3.1.2-12.el7_9) that “Resolves: #2123815 - rsync error: protocol incompatibility when using rsync-3.1.2-11.el7_9”

2 Likes

Doesn’t look like it actually resolves the issue, though:

[root@neth ~]# rpm -q rsync
rsync-3.1.2-12.el7_9.x86_64

[root@neth-backup ~]# rpm -q rsync
rsync-3.1.2-12.el7_9.x86_64

…but every 15 minutes, I get this email:

hotsync error: rsync returned 2. rsync output:
ERROR: rejecting excluded file-list name: var/lib/nethserver/backup
rsync error: protocol incompatibility (code 2) at flist.c(907) [receiver=3.1.2]
rsync error: protocol incompatibility (code 2) at io.c(1640) [generator=3.1.2]

A shot in the dark here (I do not have hotsync installed), but upon reading some snippets here and there I came across several mentioning of ‘clean your shell’ and ’ Possibly your ~/.bashrc has some output like echo’ ,

That would me lead to investigating my shell environments/scripts etc.

HTH

It’s easy enough to work around: yum downgrade rsync-3.1.2-10.el7. But whatever the bug in -11 was, it wasn’t fixed in -12.

Then it’s time to classify the topic as bug?
AFAIK Hotsync was put out from NS7 and now is part of NethForge repository. Unfortunately… I don’t remember the user that was mantaining that package.

Edit: someone did.

…and it’s back again. Apparently my hotsync target did an auto-update this morning, and it started failing again. Is this such an intractable upstream bug that we can’t do anything about it with Nethserver? Maybe Requires: rsync <= 3.1.2-10?

Hi @danb35 I have to investigate. Give me some time… I Will update you asap

2 Likes