Odd set of files not synchronising

I’ve been running syncthing to synchronise some directories on three computers quite successfully for quite a while.

Now, for some reason, just a few files (19 to be exact) in one part of the directory hierarchy won’t synchronise on just one system. The files in question are accessible by the syncthing user on all three systems and don’t appear to be different in any way from other files in the same directories.

All three systems are running Linux and the latest syncthing.

Any ideas how to diagnose what’s wrong?

Check the logs

Are this new files not being picked up by syncthing or aren’t they synced to that one device? In the first case as Audrius said, you need to check logs, in the second case the failed items list in the web UI should give a reason.

Of course. The errors are things like:-

[ZGBSA] 2017/12/05 13:11:10 INFO: Puller (folder “wiki” (wiki), dir “data/wiki/lib/plugins/xv”): remove /home/chris/wiki/data/wiki/lib/plugins/xv: directory not empty [ZGBSA] 2017/12/05 13:11:10 INFO: Puller (folder “wiki” (wiki), dir “data/wiki/lib/plugins/xv/.hg”): remove /home/chris/wiki/data/wiki/lib/plugins/xv/.hg: directory not empty [ZGBSA] 2017/12/05 13:11:10 INFO: Puller (folder “wiki” (wiki), dir “data/wiki/lib/tpl”): remove /home/chris/wiki/data/wiki/lib/tpl: directory not empty

But the directory isn’t empty and shouldn’t be empty so why is one syncthing trying to remove it?

One syncthung is reporting one directory as ‘Out of Sync’. See previous reply for the underlying problem. The trouble is I can’t see how to fix it. The directories it’s trying to remove aren’t and shouldn’t be empty.

General disclaimer not necessarily related to your problem: syncing .hg dirs is probably as bad an idea as syncing .git.

There is a bug being fixed that can cause this behaviour if you replaced a dir with a symlink in place. Unlikely that this is the case, but if it is you either need to remove the symlink or the directory on the respective device. if you didn’t do anything like this, I don’t have any good idea except to ask you to double check that directory on involved devices

Are you ignoring the .hg directory somewhere? I suggest you look at recent changes as it seems someone deleted that.

General disclaimer not necessarily related to your problem: syncing .hg dirs is probably > as bad an idea as syncing .git.

Why? It’s been happily doing it for several months if not a year or more. I am the only hg user so there will never be issues with multiple updates or similar.

I’m synchronising the whole Dokuwiki installation so it would be difficult to exclude the .hg directories and, if I did, I’d lose what I need which is to be able to see updates etc. whereverI edit the files.

If you can be 100% that you never do any “concurrent” changes (as in sync is complete before you make changes) then it is not a problem. Also hg might do stuff differently than git, so it might be less susceptible to problems. Git repos get corrupted almost certainly if such “concurrent” changes happen - that’s why we don’t recommend it. But as I said, that’s most likely not source of the problem you described.

Well as it’s just me I’m hardly likely to edit in more than one place at a time! As I said it has worked well for many months. I’ve finally got rid of the error by removing the tree from synchronisation on all three computers and then adding it back. It’s an infrequent enough problem not to worry me all that much really, the fix only took a few minutes to do.

Regardless it would be interesting to know what it was, given you said the folder exists everywhere. But I guess we are past that point now.

Yes, I quite agree. It looks as if the system with the error had a sort of ‘left over’ requirement to delete those directories which hadn’t got executed before something later had populated them.

I suspect it may be down to moving/renaming directories.

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