NC constantly trying to sync over and over and failing

Nextcloud version (eg, 12.0.2): ** 17.0.0**
Operating system and version (eg, Ubuntu 17.04): Windows 10 Home 1903 (18362.418)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29 (Ubuntu)
PHP version (eg, 7.1): PHP 7.2.24-0ubuntu0.18.04.1

The issue you are facing: I have a folder of artwork on an external HDD which I sync to my NC server. When I do this for the first time, the artwork syncs up correctly with no issues. All attempts after this, NC will constantly check over and over to make sure everything is synced even when nothing changes. I’ve had my NC Windows client paused sync for a couple of weeks with the external HDD detached. I accidentally clicked to resume sync last week without the HDD plugged in. I paused the sync. Today I plugged my external HDD in and resumed sync in my NC Windows client.

I got a bunch of errors stating “Connection closed” for various files for seemingly no reason.

When I enabled logging, I see things like this appear a lot:

[OCC::FolderMan::slotScheduleFolderByTime Scheduling folder “2” , the last 1 syncs failed , anotherSyncNeeded 0 , last status: “Sync Running” , time since last sync: 1759602
[OCC::FolderMan::scheduleFolder Schedule folder “2” to sync!
[OCC::FolderMan::scheduleFolder Sync for folder “2” already scheduled, do not enqueue!

The full log of my session this evening is available here:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Add a folder with artwork in to NextCloud
  2. Let it sync to completion
  3. Pause Sync
  4. ReSync with external HDD containing sync folder on unplugged
  5. Pause Sync
  6. Plug external HDD back in and resync

The output of your Nextcloud log in Admin > Logging:

(It was too large for pastebin or this post)

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'db_username',
  'dbpassword' => 'db_password',
  'installed' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 3,
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => 'emailaddress',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '',
  'mail_smtppassword' => 'xxxxxxxxxxxxxxxx',
  'updater.secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  '' => 'stable',

The output of your Apache/nginx/system log in /var/log/____:

cat: /etc/ntp.conf: No such file or directory
cat: /etc/ntp.conf: No such file or directory
[Fri Nov 08 01:17:47.556315 2019] [authz_core:error] [pid 22299] [client] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri Nov 08 01:54:43.121258 2019] [authz_core:error] [pid 27111] [client] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata

Does anyone have any thoughts on this?

I’ve since upgraded my Nextcloud server to v 17.0.1 and my Windows Nextcloud client to v 2.6.1.