Cannot get Receive Only host on sync

Hi. I’m setting up ST between two CentOS 7.9 hosts, both running 1.22.0. Daemon running via systemd as root user. Syncing four dirs all on ext4 fs.

Since it’s a production environment, which I previously synced with rsync, I started ST on the current main/primary server, and added the secondary host in Receive Only mode (which is the current situation).

Sync works, but the secondary keeps showing Local Additions. Even if I click on Revert Local Changes, it turns green for a few moments, but after a quick scan it still detects local changes.

From a quick check, most of the detected changed items are empty directories. But not all of them.

At first sight, the only difference I could notice between the nodes is the presence of extended attributes on files on the secondary host. So I enabled Sync Extended Attributes, ran a Rescan, Revert Local Changes once more, but local additions are still detected.

I cannot find a way out of it.

Oct 10 16:05:28 secondarynode syncthing: [LXHJP] DEBUG: walker/dati-cl@0xc00445e4d0 dir: gps Directory{Name:"gps", Sequence:0, Permissions:0777, ModTime:2022-08-23 09:26:26 +0200 CEST, Version:{[{LXHJPLL 1665410728} {WKR5X3I 1665143775}]}, VersionHash:, Deleted:false, Invalid:false, LocalFlags:0x8, NoPermissions:false, Platform:{owner_name:"root" uid:0 gid:700007  <nil> xattrs:<name:"security.selinux" value:"unconfined_u:object_r:default_t:s0\000" >  <nil> <nil> <nil>}}

After removing the security.selinux attribute, the debug shows:

Oct 10 16:07:54 gestionalelan syncthing: [LXHJP] DEBUG: walker/dati-cl@0xc0009d64d0 dir: gps Directory{Name:"gps", Sequence:0, Permissions:0777, ModTime:2022-08-23 09:26:26 +0200 CEST, Version:{[{LXHJPLL 1665410874} {WKR5X3I 1665143775}]}, VersionHash:, Deleted:false, Invalid:false, LocalFlags:0x8, NoPermissions:false, Platform:{owner_name:"root" uid:0 gid:700007  <nil>  <nil> <nil> <nil>}}

but dir still shows as locally changed.

Side note: I don’t really care about extended attributes, I enabled it only because I thought it could be the cause of the detected changes.

This is the configuration on the primary node:

And this on the secondary:

Local changes dialog:

This is the status page on secondary

immagine

Where else can I look to find the reason why these local changes continuously pop up? I see 1.22 is rather new, as well as extended attr sync. Is it worth or safe to consider a downgrade? thanks

P.S. adding detail: my main goal is to obtain a two-way sync, but before enabling it I’d like to have a green situation on both sides

Just a thought, you could go the other way and set the source to send only and the secondary as send-receive, see if that helps.

Have you checked the permissions can be set equally or do you happen to have them ignored?

I didn’t try, indeed it’s another option. I fear about unwanted changes I could generate on the secondary server…

They should be the same, as said, I previously run rsync -a from the primary to the secondary.

What I see is odd is that in the local changes list, all listed items have size of 128 B. It’s like an attribute I’m missing…

I’ve had the same problem multiple times, also with Receive Only folders and manually copied pre-existing data. The 128-byte items should be all directories. Is this correct?

The thing is that I’ve never managed to find a fix for this, nor have I been able to reproduce at will in a test environment. The only two solutions that worked for me were either a) set the folder to Send & Receive and let the “changes” sync (which there should be none in reality, but this will make Syncthing happy), or b) start from an empty state and let Syncthing download everything from other devices instead of copying the data in advance.

1 Like

I have ~90 items, so I haven’t checked all of them, but yes they appear to be all directories. Most of them are empty.

Thank you very much for the feedback. I’ll find a moment to take a backup and dare changing the share to Send & Receive, as it should be the final setup. :slight_smile:

For the record, you can change back to Receive Only later on. It’s just the first sync that is problematic like that.

Ok I’ve now deleted the folder on the secondary node.

First, I wasn’t able to have it discover the folder again. I had to unshare it from the primary, share again, so I was able to accept the share.

When I added the share, an error immediately popped up about *Folder Marker Missing. .stfolder does exist on the primary node, while it doesn’t on the secondary as I’ve removed and deleted the folder.

I paused the folder, set it to receive only, started again. Now it seemed like it was duplicating the data, the Global State counter was double the size of the folder itself…

I’m now unsure on how to proceed.

You may be experiencing https://github.com/syncthing/syncthing/issues/8416. I’d suggest to let it finish the whole process, then restart Syncthing and see whether the doubled global state gets fixed by itself.

I can confirm that since last version there are more out of sync states because of “local additions” on receive only folders

I’m using 1.22 and I’ve ran into this

I managed to finish the sync from scratch, I still had these out of sync dirs, even more than before! Anyway, setting the folder to Send and Receive fixed those items, as you said. Thank you for the solution

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.