Server replied with an error while reading directory

Nextcloud version: 24.0.3.2
Operating system and version: Ubuntu 20.04)
Apache or nginx version: Unknown, Running Nextcloiud from Ubuntu Snap Install
PHP version: Unknown, Running Nextcloiud from Ubuntu Snap Install

When trying to sync files using the Desktop Client for Windows 10 (Version 3.5.4) I am getting this error: "Server replied with an error while reading directory [Directory Name]: connection closed.

This is not happening for all files I have shared just 2 directory’s that won’t sync nor appear in file explorer.

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

Steps to replicate it:

  1. Share files to my user
  2. Tell desktop client to sync thoes files.

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'default_phone_region' => '1',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'ocddxcpapuav',
  'passwordsalt' => 'dqf5BqKeB6i/eR0/mf6foWtljXQthy',
  'secret' => 'wPODUEvND1kDtPqzbzPvkDm5KkImrneG1FVn+o7NYjs3FacD',
  'trusted_domains' =>
  array (
    0 => 'Internal IP',
    1 => 'Public IP',
    2 => 'FQDN',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.3.2',
  'overwrite.cli.url' => 'http://IP',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'maintenance' => false,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'MAIL DOMAIN',
  'mail_smtphost' => 'FQDN of MailServer',
  'mail_smtpport' => 'SMTP PORT',
  'mail_smtpauthtype' => 'PLAIN',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
    0 => 'Admin-Maintenance',
    1 => 'Maintenance',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
    0 => 'admin',
  ),
  'skeletondirectory' => '',
  'loglevel' => 2,


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

Can't find any Apache Logs here.  cd /var/log  Here is all log files listed in this directory.
alternatives.log       alternatives.log.8.gz  bootstrap.log          dmesg.1.gz      dpkg.log.2.gz  faillog         kern.log.4.gz  syslog.4.gz                ubuntu-advantage.log.4.gz        wtmp
alternatives.log.1     alternatives.log.9.gz  btmp                   dmesg.2.gz      dpkg.log.3.gz  fontconfig.log  landscape      syslog.5.gz                ubuntu-advantage.log.5.gz
alternatives.log.2.gz  apt                    btmp.1                 dmesg.3.gz      dpkg.log.4.gz  installer       lastlog        syslog.6.gz                ubuntu-advantage.log.6.gz
alternatives.log.3.gz  auth.log               cloud-init.log         dmesg.4.gz      dpkg.log.5.gz  journal         private        syslog.7.gz                ubuntu-advantage-timer.log
alternatives.log.4.gz  auth.log.1             cloud-init-output.log  dpkg.log        dpkg.log.6.gz  kern.log        syslog         ubuntu-advantage.log       ubuntu-advantage-timer.log.1
alternatives.log.5.gz  auth.log.2.gz          dist-upgrade           dpkg.log.1      dpkg.log.7.gz  kern.log.1      syslog.1       ubuntu-advantage.log.1     ubuntu-advantage-timer.log.2.gz
alternatives.log.6.gz  auth.log.3.gz          dmesg                  dpkg.log.10.gz  dpkg.log.8.gz  kern.log.2.gz   syslog.2.gz    ubuntu-advantage.log.2.gz  ubuntu-advantage-timer.log.3.gz
alternatives.log.7.gz  auth.log.4.gz          dmesg.0                dpkg.log.11.gz  dpkg.log.9.gz  kern.log.3.gz   syslog.3.gz    ubuntu-advantage.log.3.gz  unattended-upgrades

in /var/snap/nextcloud/current/logs I found this:

Tue Aug 16 20:15:28.181308 2022] [proxy_fcgi:error] [pid 1798407:tid 140668953417472] (70008)Partial results are valid but processing is incomplete: [client CLIENT IP] AH01075: Error dispatching request to : (reading input brigade)


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

/var/www does not exist. in /var/snap/nextcloud/current/logs I found this:
2022-08-16 14:17:22:474 [ debug nextcloud.sync.networkjob C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\abstractnetworkjob.cpp:298 ] [ OCC::AbstractNetworkJob::slotFinished ]: Network job OCC::LsColJob finished for “/Mt Sunshine/Commission Reports/Leasing”
2022-08-16 14:17:22:474 [ info sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\discovery.cpp:42 ]: STARTING “Mt Sunshine/Commission Reports/Leasing/2021” OCC::ProcessDirectoryJob::NormalQuery “Mt Sunshine/Commission Reports/Leasing/2021” OCC::ProcessDirectoryJob::ParentDontExist
2022-08-16 14:17:22:474 [ info nextcloud.sync.accessmanager C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\accessmanager.cpp:78 ]: 6 “PROPFIND” “http://FQDN/remote.php/dav/files/dmarlatt/Mt Sunshine/Commission Reports/Leasing/2021” has X-Request-ID “0a64a82a-e50a-44ea-8287-415920051160”
2022-08-16 14:17:22:474 [ debug nextcloud.sync.cookiejar C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\cookiejar.cpp:90 ] [ OCC::CookieJar::cookiesForUrl ]: QUrl(“FQDN/remote.php/dav/files/dmarlatt/Mt Sunshine/Commission Reports/Leasing/2021”) requests: (QNetworkCookie(“nc_sameSiteCookielax=true; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=FQDN; path=/”), QNetworkCookie(“nc_sameSiteCookiestrict=true; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=FQDN; path=/”), QNetworkCookie(“oc_sessionPassphrase=MFJbdOZWEc6pF3KARf%2F71sWITETdHhm54sRMWGWOW16evHmzKZelmjEkECDY%2BY1KNLpkOgOUsY%2B40LmDxbCAH%2Fm1qsKFJpxfJoWNoEjTPi9%2BDkfxvdGQdJQHPLUzzTt6; HttpOnly; domain=FQDN; path=/”), QNetworkCookie(“ocddxcpapuav=ot3f3305q1i51f2g1658m1c9nn; HttpOnly; domain=FQDN; path=/”))
2022-08-16 14:17:22:474 [ info nextcloud.sync.networkjob C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\abstractnetworkjob.cpp:361 ]: OCC::LsColJob created for “http://FQDN” + “/Mt Sunshine/Commission Reports/Leasing/2021” “OCC::DiscoverySingleDirectoryJob”
2022-08-16 14:17:22:540 [ info nextcloud.sync.credentials.webflow C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\creds\webflowcredentials.cpp:425 ]: request finished
2022-08-16 14:17:22:540 [ warning nextcloud.sync.networkjob C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\abstractnetworkjob.cpp:224 ]: QNetworkReply::RemoteHostClosedError “Connection closed” QVariant(Invalid)
2022-08-16 14:17:22:540 [ warning nextcloud.sync.credentials.webflow C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\creds\webflowcredentials.cpp:227 ]: QNetworkReply::RemoteHostClosedError
2022-08-16 14:17:22:540 [ warning nextcloud.sync.credentials.webflow C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\creds\webflowcredentials.cpp:228 ]: “Connection closed”
2022-08-16 14:17:22:540 [ info nextcloud.sync.networkjob.lscol C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\networkjobs.cpp:395 ]: LSCOL of QUrl(“http://FQDN/remote.php/dav/files/dmarlatt/Mt Sunshine/Sunshine POD/Detroit and Terraces”) FINISHED WITH STATUS “RemoteHostClosedError Connection closed”
2022-08-16 14:17:22:540 [ warning nextcloud.sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\discoveryphase.cpp:589 ]: LSCOL job error “Connection closed” 0 QNetworkReply::RemoteHostClosedError
2022-08-16 14:17:22:540 [ warning sync.discovery C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\discovery.cpp:1745 ]: Server error in directory “Mt Sunshine/Sunshine POD/Detroit and Terraces” 0
2022-08-16 14:17:22:540 [ warning nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\tray\usermodel.cpp:485 ]: Item “Nextcloud” retrieved resulted in “Server replied with an error while reading directory "Mt Sunshine/Sunshine POD/Detroit and Terraces" : Connection closed”
2022-08-16 14:17:22:541 [ info nextcloud.gui.activity C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\tray\activitylistmodel.cpp:547 ]: Error successfully added to the notification list: “Server replied with an error while reading directory "Mt Sunshine/Sunshine POD/Detroit and Terraces" : Connection closed”
2022-08-16 14:17:22:555 [ info nextcloud.sync.engine C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\syncengine.cpp:838 ]: Sync run took 1139 ms
2022-08-16 14:17:22:555 [ debug nextcloud.sync.database.sql C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\common/ownsql.h:145 ] [ OCC::SqlQuery::bindValue ]: SQL bind 1 “last_sync”
2022-08-16 14:17:22:555 [ debug nextcloud.sync.database.sql C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\common/ownsql.h:145 ] [ OCC::SqlQuery::bindValue ]: SQL bind 2 QVariant(qlonglong, 1660681042)
2022-08-16 14:17:22:555 [ debug nextcloud.sync.database.sql C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\common\ownsql.cpp:295 ] [ OCC::SqlQuery::exec ]: SQL exec “INSERT OR REPLACE INTO key_value_store (key, value) VALUES(?1, ?2);”
2022-08-16 14:17:22:556 [ debug nextcloud.sync.database.sql C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\common\ownsql.cpp:328 ] [ OCC::SqlQuery::exec ]: Last exec affected 1 rows.
2022-08-16 14:17:22:556 [ debug nextcloud.sync.networkjob C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\libsync\abstractnetworkjob.cpp:298 ] [ OCC::AbstractNetworkJob::slotFinished ]: Network job OCC::LsColJob finished for “/Mt Sunshine/Sunshine POD/Detroit and Terraces”
2022-08-16 14:17:22:561 [ info nextcloud.gui.folder C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\folder.cpp:964 ]: Client version 3.5.4stable-Win64 (build 20220802) Qt 5.15.2 SSL OpenSSL 1.1.1l 24 Aug 2021
2022-08-16 14:17:22:561 [ warning nextcloud.gui.folder C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\folder.cpp:971 ]: SyncEngine finished with ERROR
2022-08-16 14:17:22:561 [ info nextcloud.gui.folder C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\folder.cpp:413 ]: Folder “” sync result: OCC::SyncResult::SyncPrepare
2022-08-16 14:17:22:561 [ info nextcloud.gui.folder C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\folder.cpp:997 ]: the last 2 syncs failed
2022-08-16 14:17:22:561 [ debug nextcloud.gui.socketapi C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\socketapi\socketapi.cpp:205 ] [ OCC::SocketListener::sendMessage ]: Sending SocketAPI message → “UPDATE_VIEW:C:\Users\dmarlatt\Nextcloud” to QLocalSocket(0x17a07b250e0)
2022-08-16 14:17:22:562 [ info nextcloud.gui.application C:\Users\sysadmin\AppData\Local\Temp\2\windows-11185\client-building\desktop\src\gui\owncloudgui.cpp:196 ]: Sync state changed for folder “http://FQDN/remote.php/dav/files/dmarlatt/” : “Error”