Elemente lassen sich nicht synchronisieren

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.

Are those files ignored?

No, these files are not ignored. I running now ./syncthing -reset-deltas, because of no function of ./syncthing -reset-database

But is not the first time tu run ./syncthing -reset-deltas up to now with no effects or changes.

Every time I use this command, I get

root@Synology:/var/packages/syncthing/target/bin# ./syncthing -reset-deltas

[start] 18:33:24 INFO: syncthing v1.4.0-rc.10 "Fermium Flea" (go1.13.8 linux-amd64) teamcity@build.syncthing.net 2020-02-29 18:51:48 UTC
[start] 18:33:24 INFO: Automatic upgrade is always enabled for candidate releases.
[BBRAO] 18:33:24 INFO: My ID: BBRAOxxxxxxxxxxx
[BBRAO] 18:33:25 INFO: Single thread SHA256 performance is 75 MB/s using minio/sha256-simd (62 MB/s using crypto/sha256).
[BBRAO] 18:33:26 INFO: Hashing performance is 60.56 MB/s
[BBRAO] 18:33:26 INFO: Migrating database to schema version 1...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 2...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 3...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 5...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 6...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 7...
[BBRAO] 18:33:26 INFO: Migrating database to schema version 9...
[BBRAO] 18:33:26 INFO: Compacting database after migration...
[BBRAO] 18:33:26 INFO: Reinitializing delta index IDs
[BBRAO] 18:33:26 INFO: Starting deadlock detector with 20m0s timeout
[BBRAO] 18:33:26 INFO: Overall send rate is unlimited, receive rate is unlimited
[BBRAO] 18:33:26 INFO: No stored folder metadata for "default"; recalculating
[BBRAO] 18:33:26 INFO: Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCxxxxxx
[BBRAO] 18:33:26 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[BBRAO] 18:33:26 INFO: Ready to synchronize "Default Folder" (default) (sendreceive)
[BBRAO] 18:33:26 INFO: TCP listener ([::]:34918) starting
[BBRAO] 18:33:26 INFO: Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCxxxxxxxxxx
[BBRAO] 18:33:26 INFO: Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCxxxxxxxxxx
[BBRAO] 18:33:26 INFO: Anonymous usage reporting is always enabled for candidate releases.
[BBRAO] 18:33:26 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[BBRAO] 18:33:26 INFO: GUI and API listening on 127.0.0.1:8384
[BBRAO] 18:33:26 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BBRAO] 18:33:26 INFO: My name is "Synology"
[BBRAO] 18:33:26 WARNING: Syncthing should not run as a privileged or system user. Please consider using a normal user account.
[BBRAO] 18:33:37 INFO: New NAT port mapping: external TCP address 79.246.211.230:30147 to local address 0.0.0.0:34918.
[BBRAO] 18:33:37 INFO: Detected 3 NAT services
[BBRAO] 18:33:58 INFO: Joined relay relay://62.210.140.119:22067
[BBRAO] 19:03:28 INFO: Sent usage report (version 3)

Since the problem has shifted to Synology 1815 because of the “Out of Sync Items”, I’ll give a brief outline of the things.

The allegedly not synchronized elements (10.391) should be contained in 6 peers (folders):

However, the individual peers are all up to date and do not show any “Out of Sync Items”:

Syncthing-71

Syncthing-72

Syncthing-73

Syncthing-74

Syncthing-75

Syncthing-76

And yet this deviation is still displayed today:

Syncthing-77_LI

Why are the 10.391 elements not divided and displayed among these 6 peers?

Please query https://docs.syncthing.net/rest/db-file-get.html for one file that is displayed as out-of-sync both on “Synology-412” and on “Synology-1815-SynoComm”.

Also are all the folders with out-of-sync files in send/receive-only folders on one device? Did you switch any of those devices from send-/receive-only to send-receive or the other way around at some point?

Thanks for the stindex output. I am currently suspecting a logic error around determining needed files and switching to/from send-/receive-only folders (just circumstantial suspicions, nothing concrete unfortunately).

Everything is up to date on the Synology 412, peers and device:

Syncthing-78

Regarding the peers, only “Buchhaltung” and “Serpil” is on “Send only”. You can see it in the pictures of the peers. However, there doesn’t seem to be a pattern.

Meaning when you click on the number of out of sync sync items to get the list of files, they are from various different folders, right?

Could you run the rest command for one of those files please:

This will (hopfully) show what the difference in database is, that causes the inconsistent display.

As showed above…

I understand that “GET /rest/db/file” should run as a script.

Can the data to be entered export from the database?

It is sometimes difficult for me to store the correct data, e.g. the correct information for “"modified":"2018-08-18T12:21:13.836784059+02:00",” or “"modifiedBy":"SYNO4VL",” etc.

Yes.

Right, missed that sorry. Well, then my send-/receive-only gut feeling is wrong. Lets hope the /rest/db/file output contains some clues.

You don’t need that, the url part is something like 'http://localhost:8384/rest/db/file?folder=ccbah-xmdl5&file=path/to/an/out-of-sync/file'.

One of the file is KTO_DAT.VMB and on my Synology I use the port 7070 instead of 8384, so I use

https://192.168.168.111:7070/rest/db/file?folder=ccbah-xmdl5&file=/volume1/Buchhaltung/Buchhalter/FORMULAR/KTO_DAT.VMB

Result:

CSRF Error

I am not sure anymore whether CSRF is due to the API key or https. If you use https, then that bit of the docs is relevant:

(add -k flag when using HTTPS with a Syncthing generated or self signed certificate)

Otherwise double check your api key (the abc123 part in -H "X-API-Key: abc123").

I deactivate https:// in the GUI section and run

http://192.168.168.111:7070/rest/db/file?folder=ccbah-xmdl5&file=/volume1/Buchhaltung/Buchhalter/FORMULAR/KTO_DAT.VMB

in a new brwoser instance. I must give my user and password and got the same result:

CSRF Error

How to use in a link?