Desktop client syncing issue

I have my nextcloud running on Debian 8, I also am using the sync client to keep a copy of the files on my computer. I have my video surveillance set to copy the files to my (Windows based) FTP server. This folder happens to reside in the nextcloud share tree. This has been working well since I originally installed it.

Recently I started getting some failures in syncing the files up to the server, but I don’t know where to start looking for the issue.

The error log shows this:

# timestamp | duration | file | instruction | dir | modtime | etag | size | fileId | status | errorString | http result code | other size | other modtime | other etag | other fileId | other instruction
#=#=#=# Syncrun started 2017-06-21T18:22:03
#=#=#=#=# Propagation starts 2017-06-21T18:22:08 (last step: 4995 msec, total: 4995 msec)
||Surveillance/Cam-FrontPorch/01_20170616045658.mp4|INST_SYNC|Up|1497614257|dd1a9c7862a43963b199e1064f711902|38061698|00186315ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170616045658.mp4-chunking-2673417508-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|6616999|1497614221|dd1a9c7862a43963b199e1064f711902|00186315ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170616010356.mp4|INST_SYNC|Up|1497600285|3ed75f27ce6780b6bef1513dab5fd9ea|44358634|00186279ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170616010356.mp4-chunking-2184256291-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9722453|1497600243|3ed75f27ce6780b6bef1513dab5fd9ea|00186279ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170616050755.mp4|INST_SYNC|Up|1497614919|8fe21b07ca076e3cd0f8e579ec7c87cb|46545891|00186317ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170616050755.mp4-chunking-1647855520-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|5209956|1497614878|8fe21b07ca076e3cd0f8e579ec7c87cb|00186317ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170616053514.mp4|INST_SYNC|Up|1497616553|35c2153fddea8821365ed2129c1dca4f|35147483|00186319ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170616053514.mp4-chunking-385902406-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|3730006|1497616519|35c2153fddea8821365ed2129c1dca4f|00186319ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170616125436.mp4|INST_SYNC|Up|1497642924|ea9a65ef94b180403d7d79a303fb0aa6|47800187|00186364ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170616125436.mp4-chunking-111668306-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|5502747|1497642878|ea9a65ef94b180403d7d79a303fb0aa6|00186364ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170617104755.mp4|INST_SYNC|Up|1497721713|37dbd918f0b89f74548df7d04194b571|34976036|00186502ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170617104755.mp4-chunking-3908698046-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|7461940|1497721679|37dbd918f0b89f74548df7d04194b571|00186502ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170618010356.mp4|INST_SYNC|Up|1497773086|3530917d5008bc07840645dca329cf57|46054030|00186799ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170618010356.mp4-chunking-3813719053-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|5053028|1497773043|3530917d5008bc07840645dca329cf57|00186799ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170619010356.mp4|INST_SYNC|Up|1497859485|5111e662d2b441c6785f68fe209a4d12|45586831|00187598ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170619010356.mp4-chunking-3226483596-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|4275743|1497859442|5111e662d2b441c6785f68fe209a4d12|00187598ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170618173824.mp4|INST_SYNC|Up|1497832795|c4857cd2e43d1aaecb9b5c257cc2ae8c|88512127|00187371ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170618173824.mp4-chunking-3483404990-9-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|7427483|1497832709|c4857cd2e43d1aaecb9b5c257cc2ae8c|00187371ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170620144517.mp4|INST_SYNC|Up|1497995151|85cf9e602a510584af9472bee943e68b|31456595|00189265ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170620144517.mp4-chunking-2759989730-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9413522|1497995121|85cf9e602a510584af9472bee943e68b|00189265ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170620152333.mp4|INST_SYNC|Up|1497997449|1c3c08960b73383e16b3fc552db50de4|33710379|00189431ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170620152333.mp4-chunking-955920117-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9684057|1497997417|1c3c08960b73383e16b3fc552db50de4|00189431ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170620161007.mp4|INST_SYNC|Up|1498000241|7567fe5cebce563750cb054d7d27fe9e|31550367|00189536ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170620161007.mp4-chunking-843989823-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9606344|1498000211|7567fe5cebce563750cb054d7d27fe9e|00189536ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170621010355.mp4|INST_SYNC|Up|1498032286|cae75fcafb6bb60a19edabc7c67bc989|47319670|00190974ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170621010355.mp4-chunking-1403294610-5-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|6763369|1498032243|cae75fcafb6bb60a19edabc7c67bc989|00190974ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-FrontPorch/01_20170621160249.mp4|INST_SYNC|Up|1498086205|1dc6a94177297665a1c531559e20569d|32444792|00192582ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-FrontPorch/01_20170621160249.mp4-chunking-1219127194-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|8882387|1498086174|1dc6a94177297665a1c531559e20569d|00192582ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-NorthWest/01_20170616223915.mp4|INST_SYNC|Up|1497677987|1ba8bf266d663016abf8881348b5fe6c|31348885|00186435ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-NorthWest/01_20170616223915.mp4-chunking-21564325-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9354225|1497677956|1ba8bf266d663016abf8881348b5fe6c|00186435ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-NorthWest/01_20170617053434.mp4|INST_SYNC|Up|1497702911|369a088e3a2d0b68eb285a00bbe0114b|37310922|00186500ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-NorthWest/01_20170617053434.mp4-chunking-135777207-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|8561168|1497702878|369a088e3a2d0b68eb285a00bbe0114b|00186500ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-NorthWest/01_20170617121242.mp4|INST_SYNC|Up|1497726842|cc393c2aa7d4a7b5a7b8faeda7585f52|81648777|00186523ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-NorthWest/01_20170617121242.mp4-chunking-2236939756-9-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|8480679|1497726764|cc393c2aa7d4a7b5a7b8faeda7585f52|00186523ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-NorthWest/01_20170620181941.mp4|INST_SYNC|Up|1498008023|d26f72ded92dd80c2cc3b24111ac1c4c|38524348|00190286ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-NorthWest/01_20170620181941.mp4-chunking-2355966984-4-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|8456459|1498007985|d26f72ded92dd80c2cc3b24111ac1c4c|00190286ocxa1fszo3b2|INST_NONE|
||Surveillance/Cam-NorthWest/01_20170619200027.mp4|INST_SYNC|Up|1497927691|a718930c0b19243553cde909888ef2bf|61787852|00188821ocxa1fszo3b2|2|Error transferring https://my.nextcloud.domain/remote.php/dav/files/user.name/Surveillance/Cam-NorthWest/01_20170619200027.mp4-chunking-2535218704-7-0 - server replied: Precondition failed (An If-Match header was specified and the resource did not exist)|412|9041035|1497927631|a718930c0b19243553cde909888ef2bf|00188821ocxa1fszo3b2|INST_NONE|

So your Windows based FTP server uses the NC client? Or as external storage in Nextcloud?

Can you also check your server logfiles?

Correct, the Windows based FTP server uses the NC client to sync the new files to the server. I had originally had the FTP running on the Debian box, but NC did not “know” the files were there and I couldn’t see them. It worked flawlessly for a number of months, this issue is pretty recent, maybe within the last month or so.

Looking at the logs, I see I updated from 11.0.2.7 to 12.0.0.29 on May 24th. That’s about when the syncing issue began with the desktop client.

Also interesting that the file appears to be on the server and the desktop. Looking at the last file listed above (01_20170619200027.mp4). On the server it shows 8.6MB, on the desktop client it shows 61MB. Looks like it possibly started uploading, but couldn’t finish for some reason?

client_side.png

server_side.png

Zipped log file (sanitized and trimmed to the day before I upgraded from v11 to v12)
https://www.dropbox.com/s/vbd81anjhu47u8h/nextcloud.zip?dl=0

I copied the files from the desktop client machine to a temp folder then deleted the files from the web client and it resynced the files up to the server, and they are the right size now.

Hopefully someone is willing to look at the logs and help me understand why they didn’t sync correctly the first time around.

But at least I was able to get past the issue.

d