Elemente lassen sich nicht synchronisieren

Hi:

This is interesting to me - it’s what I’ve seen too (but never been able to reproduce in a test case), that Remote Device completion reporting often doesn’t match the state as seen on the device itself. (Note: I’ve only been running pre 1.4.0 versions, so I don’t yet know if my situations are mitigated by this yet.)

I think I understand what Andy is saying:

  • Server 1815 has more folders shared with other device than server 412 does - hence the difference in number of files;
  • The out-of-sync file listing in the remote devices only shows files in 4 shared folders; these folders are only shared between these 2 servers.

Exactly, thats the situation.

With “Peers” I mean “Folder”. I use the naming peer only because in each “Folder” you have also folders of the synced filesystem, maybe it could be a confusion, thats all.

As I’ve said reset deltas should fix that, and I suggest you check logs as you’ve done it to verify it was done correctly.

There is also stindex idxchk utility mentioned in other threads that you can run on both sides to verify the database consistency.

1 Like

The state I described could not be fixed with -reset-deltas. I unconnect the affected 4 peers (folders) on the Synology 412 and reconnected them. Now this side is reported as “Current”.

It is not understandable. Again all the peers (folder) are “current” on both sides, nevertheless:

Now on Synology 1815 I have a total of 6 peers (folders) with 10.391 elements, which are output as “Out of Sync Items”, which were synchronized before of the above process. None of these 6 designated peers was previously one of the 4 peers (folders) on the Synology 412.

How can this be explained? I don’t know how to neutralize “Out of Sync Items”.

Run the stindex tool I suggested, see what comes back.

You can download it from https://build.syncthing.net/viewLog.html?buildId=56740&buildTypeId=Syncthing_Tools&tab=artifacts&branch_Syncthing=<default>

1 Like

I loaded in bin folder

/var/packages/syncthing/target/bin/stindex

I have to run with any parameters?

Yes - you need to give it some flags, and point it at the index folder in your Syncthing home:

stindex -mode idxck \foo\bar\index-v0.14.0.db

First run:

root@Synology:/var/packages/syncthing/target/bin# /var/packages/syncthing/target/bin/stindex -mode idxck /var/packages/syncthing/target/var/index-v0.14.0.db/

-ash: /var/packages/syncthing/target/bin/stindex: Permission denied

root@Synology:/var/packages/syncthing/target/bin#

Is also closing of all the instances needed?

Yes - shut down Syncthing on the machine you’re running stindex on.

Done, result:

root@Synology:/var/packages/syncthing/target/bin# ps -e | grep syncthing

root@Synology:/var/packages/syncthing/target/bin#

root@Synology:/var/packages/syncthing/target/bin# /var/packages/syncthing/target/bin/stindex -mode idxck /var/packages/syncthing/target/var/index-v0.14.0.db/

-ash: /var/packages/syncthing/target/bin/stindex: Permission denied

root@Synology:/var/packages/syncthing/target/bin#

Ok - can you please run these two commands and post the results:

ls -lah /var/packages/syncthing/target/bin

and

ls -lah /var/packages/syncthing/target/var

I suspect stindex isn’t executable - chmod a+x /var/packages/syncthing/target/bin/stindex would fix that.

root@Synology:/var/packages/syncthing/target/bin# ls -lah /var/packages/syncthing/target/bin
total 75M
drwxr-xr-x 1 sc-syncthing root   234 Mar  5 14:38 .
drwxr-xr-x 1 sc-syncthing root    18 Oct 22 07:58 ..
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 addgroup
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 adduser
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 busybox
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 delgroup
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 deluser
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 nice
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 renice
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 start-stop-daemon
-rw-r--r-- 1 root         root   13M Mar  5 14:31 stindex
-rwxr-xr-x 1 sc-syncthing 104555 21M Feb 29 20:47 syncthing
-rwxr-xr-x 1 sc-syncthing 104555 21M Feb 28 17:19 syncthing.old
-rwxr-xr-x 1 sc-syncthing root   21M Feb 22 11:10 syncthing.rc6_2020-02-22
root@Synology:/var/packages/syncthing/target/bin#


root@Synology:/var/packages/syncthing/target/bin# ls -lah /var/packages/syncthing/target/var
total 168K
drwx------ 1 sc-syncthing root    374 Mar  5 14:38 .
drwxr-xr-x 1 sc-syncthing root     18 Oct 22 07:58 ..
-rwxr-xr-x 1 sc-syncthing root    615 Sep 20  2017 cert.pem
-rw------- 1 sc-syncthing 104555  66K Feb 28 22:23 config.xml
-rwxr-xr-x 1 sc-syncthing root    62K Feb 14 15:03 config.xml.v29
-rw------- 1 sc-syncthing 104555  825 Mar  5 10:48 csrftokens.txt
drwxr-xr-x 1 sc-syncthing root     86 Sep 26  2017 gui_stop
-rwxr-xr-x 1 sc-syncthing root   1.1K Sep 20  2017 https-cert.pem
-rwxr-xr-x 1 sc-syncthing root   1.7K Sep 20  2017 https-key.pem
drwxr-xr-x 1 sc-syncthing root    374 Mar  5 11:40 index-v0.14.0.db
-rwxr-xr-x 1 sc-syncthing root    288 Sep 20  2017 key.pem
-rwxr-xr-x 1 sc-syncthing root    229 Mar  4  2017 options.conf
-rwxr-xr-x 1 sc-syncthing root    832 Oct 22 08:00 syncthing_install.log
-rwxr-xr-x 1 sc-syncthing root    139 Mar  5 05:19 syncthing.log
-rwxr-xr-x 1 sc-syncthing root      6 Mar  5 05:19 syncthing.pid
-rwxr-xr-x 1 sc-syncthing root      0 Jul  8  2019 .syncthing.tmp.389677925
root@Synology:/var/packages/syncthing/target/bin#
root@Synology:/var/packages/syncthing/target/bin# chmod a+x /var/packages/syncthing/target/bin/stindex

root@Synology:/var/packages/syncthing/target/bin# ls -lah /var/packages/syncthing/target/bin

total 75M
drwxr-xr-x 1 sc-syncthing root   234 Mar  5 14:38 .
drwxr-xr-x 1 sc-syncthing root    18 Oct 22 07:58 ..
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 addgroup
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 adduser
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 busybox
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 delgroup
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 deluser
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 nice
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 renice
-rwxr-xr-x 8 sc-syncthing root   32K Oct 21 23:13 start-stop-daemon
-rwxr-xr-x 1 root         root   13M Mar  5 14:31 stindex
-rwxr-xr-x 1 sc-syncthing 104555 21M Feb 29 20:47 syncthing
-rwxr-xr-x 1 sc-syncthing 104555 21M Feb 28 17:19 syncthing.old
-rwxr-xr-x 1 sc-syncthing root   21M Feb 22 11:10 syncthing.rc6_2020-02-22

root@Synology:/var/packages/syncthing/target/bin#

Synology 1815

root@Synology:/var/packages/syncthing/target/bin# /var/packages/syncthing/target/bin/stindex -mode idxck /var/packages/syncthing/target/var/index-v0.14.0.db/

172453 block list entries out of 943247 needs GC

root@Synology:/var/packages/syncthing/target/bin#

Run it on the other side.

I started in the same time and toke longer. I got a lot of entrances “Missing need entry for needed file …” as follow:

.......
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Druckaufträge/2013/Kontroll-Liste 364002 2013-02-20.pdf", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Druckaufträge/2014/Kontroll-Liste 404004 2014-11-25.pdf", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Auswertungen/U+S 2014-06-01 bis 2015-11-30 Konto 364002.TXT", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Druckaufträge/2013/Kontroll-Liste 404004 2013-02-06.pdf", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash - Kopie/ProfiCash/mikogo-viewer.exe", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/DATEN/3_71.DBF", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/DATEN/0005.ptk", folder "qt39u-sn675"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Keys/23794021.KEY", folder "qt39u-sn675"
Missing need entry for needed file "NTN/allgemein/Wenger gross Potomac FKbD90WP.pdf_Zone.Conflict.Identifier", folder "nwztd-r3g4l"
Missing need entry for needed file "Anwendungsdaten/ProfiCash/Druckaufträge/2018/Commerzbank 401679600 2018-11-30.pdf", folder "qt39u-sn675"

731761 block list entries out of 926361 needs GC

root@Synology:/var/packages/syncthing/target/bin#

All the outlined files are in the filesystem available.

Yeah, this is the device with a screwed database.

Suggest you set the healthy side to send only for all folders listed in the error messages, and run -reset-database on the unhealthy device.

Perhaps try reset-deltas first.