Client sync errors, and unable to delete the mentioned file

Nextcloud version: 27.1.5
Operating system and version: Debian 6.1.69
Apache or nginx version: Apache/2.4.57 (Debian) (fpm-fcgi)
PHP version: 8.2.7

The issue you are facing:

I would like to know how to fix client sync errors to Nextcloud, and, apparently something is wrong because I cannot delete the original file that got synchronized up. Thank you in advance for any help you can give me.

The file on my client machine was edited to be smaller. On my client machine it is now 128 MB. The file had previously been synced to Nextcloud. The file in /var/www/html/nextcloud/data/ is still 157.2 MB. I tried to delete the file in Nextcloud via the web interface, but got an error pop-up that says Error deleting file "240207_1820.mp3".

Is this the first time you’ve seen this error? (Y/N): No, it has been going on a while.

Steps to replicate it:

  1. Use a different machine (client) to synchronize the file up to Nextcloud
  2. On my main Linux machine, see that the file synchronized down to my local storage
  3. Edit the file with Audacity to trim unneeded bits from the head and the tail of the recording.
  4. Note errors popping up in the Nextcloud sync client saying Server replied "423 Locked" to "MOVE https://nc.davidg.link/remote.php/dav/uploads/david/...

For troubleshooting, I did try:

sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all

I had previously seen notes about running a MySQL query to remove locks, and did so. It didn’t report any locks, though.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YM9PM7mZfboSKBGmDE7t","level":3,"time":"2024-02-09T19:57:51+00:00","remoteAddr":"ip.local.net.12","user":"david","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"Mozilla/5.0 (Linux) mirall/3.11.1git (Nextcloud, opensuse-tumbleweed-6.7.2-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.5.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"/david/files/user.nextcloud_export","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Files/Node/LazyUserFolder.php","line":74,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_migration/lib/Notification/Notifier.php","line":241,"function":"get","class":"OC\\Files\\Node\\LazyUserFolder","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_migration/lib/Notification/Notifier.php","line":191,"function":"getImportFile","class":"OCA\\UserMigration\\Notification\\Notifier","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_migration/lib/Notification/Notifier.php","line":81,"function":"handleImportDone","class":"OCA\\UserMigration\\Notification\\Notifier","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Notification/Manager.php","line":368,"function":"prepare","class":"OCA\\UserMigration\\Notification\\Notifier","type":"->"},{"file":"/var/www/html/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":108,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/ocs/v1.php","line":65,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/ocs/v2.php","line":23,"args":["/var/www/html/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/Files/Node/Root.php","Line":206,"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"}}
{"reqId":"jtjCkQjpeB3GIxBjsvKj","level":2,"time":"2024-02-09T20:19:22+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"OPTIONS","url":"/remote.php/dav/principals/users/david/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}
{"reqId":"rrAApzmmgXKJbKPX3Ngm","level":2,"time":"2024-02-09T20:19:22+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"OPTIONS","url":"/remote.php/dav/principals/users/david/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}
{"reqId":"IUaAk2pO9pUd5Q6pDUsB","level":2,"time":"2024-02-09T20:19:23+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"REPORT","url":"/remote.php/dav/principals/users/david/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}
{"reqId":"RCsZmo7f948wYkG68QTp","level":2,"time":"2024-02-09T20:19:23+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"REPORT","url":"/remote.php/dav/addressbooks/users/david/z-server-generated--system/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}
{"reqId":"r43wnnIrXR6mxXhpJVjl","level":2,"time":"2024-02-09T20:19:24+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"REPORT","url":"/remote.php/dav/addressbooks/users/david/contacts/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}
{"reqId":"2hZ5T0K52hgJQKEqZZJq","level":2,"time":"2024-02-09T20:19:25+00:00","remoteAddr":"ip.local.net.45","user":"david","app":"suspicious_login","method":"PROPFIND","url":"/remote.php/dav/addressbooks/users/david/z-app-generated--contactsinteraction--recent/","message":"Could not predict suspiciousness: No models found","userAgent":"iOS/17.2.1 (21C66) dataaccessd/1.0","version":"27.1.5.1","data":{"app":"suspicious_login"}}

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

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nc.davidg.link"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "27.1.5.1",
    "overwrite.cli.url": "https:\/\/nc.davidg.link",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "activity_expire_days": 14,
    "installed": true,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "default_phone_region": "US",
    "default_language": "en",
    "default_locale": "en_US",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0,
        "dbindex": 0
    },
    "maintenance": false,
    "theme": "",
    "loglevel": 2
}

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

Apache error log:

[Fri Feb 09 00:00:01.369578 2024] [mpm_event:notice] [pid 652:tid 140260947580800] AH00489: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Fri Feb 09 00:00:01.369602 2024] [core:notice] [pid 652:tid 140260947580800] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 09 07:16:26.923173 2024] [proxy_fcgi:error] [pid 2197:tid 140260478482112] [client ip.local.net.12:46770] AH01067: Failed to read FastCGI header
[Fri Feb 09 07:16:26.923218 2024] [proxy_fcgi:error] [pid 2197:tid 140260478482112] (104)Connection reset by peer: [client ip.local.net.12:46770] AH01075: Error dispatching request to : 
[Fri Feb 09 07:16:32.508307 2024] [proxy_fcgi:error] [pid 2196:tid 140260520445632] (70008)Partial results are valid but processing is incomplete: [client ip.local.net.12:46780] AH01075: Error dispatching request to : (reading input brigade)
[Fri Feb 09 09:14:05.565390 2024] [mpm_event:notice] [pid 652:tid 140260947580800] AH00492: caught SIGWINCH, shutting down gracefully
[Fri Feb 09 09:49:03.861779 2024] [mpm_event:notice] [pid 638:tid 139655940003712] AH00489: Apache/2.4.57 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Fri Feb 09 09:49:03.862810 2024] [core:notice] [pid 638:tid 139655940003712] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 09 10:34:54.231631 2024] [proxy_fcgi:error] [pid 640:tid 139655584392896] [client ip.local.net.12:41312] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:34:54.231660 2024] [proxy_fcgi:error] [pid 640:tid 139655584392896] (104)Connection reset by peer: [client ip.local.net.12:41312] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:10.644301 2024] [proxy_fcgi:error] [pid 639:tid 139655106238144] [client ip.local.net.12:41324] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:36:10.644344 2024] [proxy_fcgi:error] [pid 639:tid 139655106238144] (104)Connection reset by peer: [client ip.local.net.12:41324] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:11.659177 2024] [proxy_fcgi:error] [pid 639:tid 139655626356416] [client ip.local.net.12:50662] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:36:11.659211 2024] [proxy_fcgi:error] [pid 639:tid 139655626356416] (104)Connection reset by peer: [client ip.local.net.12:50662] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:12.362611 2024] [proxy_fcgi:error] [pid 639:tid 139654519043776] [client ip.local.net.12:50674] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:36:12.362643 2024] [proxy_fcgi:error] [pid 639:tid 139654519043776] (104)Connection reset by peer: [client ip.local.net.12:50674] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:13.206780 2024] [proxy_fcgi:error] [pid 640:tid 139655617963712] [client ip.local.net.12:50684] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:36:13.206814 2024] [proxy_fcgi:error] [pid 640:tid 139655617963712] (104)Connection reset by peer: [client ip.local.net.12:50684] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:13.978425 2024] [proxy_fcgi:error] [pid 640:tid 139655601178304] [client ip.local.net.12:50694] AH01067: Failed to read FastCGI header
[Fri Feb 09 10:36:13.978457 2024] [proxy_fcgi:error] [pid 640:tid 139655601178304] (104)Connection reset by peer: [client ip.local.net.12:50694] AH01075: Error dispatching request to : 
[Fri Feb 09 10:36:30.127699 2024] [proxy_fcgi:error] [pid 640:tid 139654972020416] (32)Broken pipe: [client ip.local.net.12:50592] AH01075: Error dispatching request to : (sending stdin)
[Fri Feb 09 10:41:30.263300 2024] [proxy_fcgi:error] [pid 640:tid 139654611330752] (70007)The timeout specified has expired: [client ip.local.net.12:50644] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 10:52:01.855185 2024] [proxy_fcgi:error] [pid 640:tid 139654602938048] (70007)The timeout specified has expired: [client ip.local.net.12:48888] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 10:57:42.305673 2024] [proxy_fcgi:error] [pid 639:tid 139654502258368] (70007)The timeout specified has expired: [client ip.local.net.12:49396] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 10:57:42.361237 2024] [proxy_fcgi:error] [pid 639:tid 139654015743680] (70007)The timeout specified has expired: [client ip.local.net.12:49406] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 11:03:14.007123 2024] [proxy_fcgi:error] [pid 640:tid 139654997198528] (70007)The timeout specified has expired: [client ip.local.net.12:42772] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 11:08:43.385005 2024] [proxy_fcgi:error] [pid 639:tid 139654015743680] (70007)The timeout specified has expired: [client ip.local.net.12:57040] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 11:14:24.851181 2024] [proxy_fcgi:error] [pid 639:tid 139655114630848] (70007)The timeout specified has expired: [client ip.local.net.12:35872] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 11:44:19.911202 2024] [access_compat:error] [pid 639:tid 139655921010368] [remote ip.local.net.12:33016] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri Feb 09 11:59:09.347241 2024] [access_compat:error] [pid 639:tid 139655921010368] [remote ip.local.net.12:52952] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri Feb 09 12:05:48.166095 2024] [access_compat:error] [pid 640:tid 139655736133312] [remote ip.local.net.12:59646] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri Feb 09 12:11:22.499438 2024] [proxy_fcgi:error] [pid 639:tid 139655710922432] (70007)The timeout specified has expired: [client ip.local.net.12:39506] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:11:22.499476 2024] [proxy_fcgi:error] [pid 639:tid 139655148201664] (70007)The timeout specified has expired: [client ip.local.net.12:39490] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:11:23.033384 2024] [proxy_fcgi:error] [pid 639:tid 139654552614592] (70007)The timeout specified has expired: [client ip.local.net.12:39518] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:11:23.133601 2024] [proxy_fcgi:error] [pid 640:tid 139655584392896] (70007)The timeout specified has expired: [client ip.local.net.12:39530] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:11:30.747120 2024] [proxy_fcgi:error] [pid 639:tid 139654527436480] (70007)The timeout specified has expired: [client ip.local.net.12:39462] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:16:23.568938 2024] [proxy_fcgi:error] [pid 639:tid 139654535829184] (70007)The timeout specified has expired: [client ip.local.net.12:39506] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:16:23.769353 2024] [proxy_fcgi:error] [pid 639:tid 139655626356416] (70007)The timeout specified has expired: [client ip.local.net.12:39518] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:22:11.409647 2024] [proxy_fcgi:error] [pid 639:tid 139655148201664] (70007)The timeout specified has expired: [client ip.local.net.12:47524] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:25:46.579304 2024] [proxy_fcgi:error] [pid 639:tid 139654015743680] [client 170.64.220.66:43084] AH01071: Got error 'Primary script unknown'
[Fri Feb 09 12:27:39.354417 2024] [proxy_fcgi:error] [pid 639:tid 139654502258368] (70007)The timeout specified has expired: [client ip.local.net.12:56424] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:33:10.392342 2024] [proxy_fcgi:error] [pid 640:tid 139655601178304] (70007)The timeout specified has expired: [client ip.local.net.12:54252] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:38:38.235183 2024] [proxy_fcgi:error] [pid 640:tid 139654602938048] (70007)The timeout specified has expired: [client ip.local.net.12:55622] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:38:38.235185 2024] [proxy_fcgi:error] [pid 639:tid 139655139808960] (70007)The timeout specified has expired: [client ip.local.net.12:55634] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:41:13.607706 2024] [access_compat:error] [pid 640:tid 139655862261440] [remote ip.local.net.12:48382] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
[Fri Feb 09 12:44:14.180826 2024] [proxy_fcgi:error] [pid 640:tid 139654586152640] (70007)The timeout specified has expired: [client ip.local.net.12:55594] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:49:42.312605 2024] [proxy_fcgi:error] [pid 639:tid 139655609571008] (70007)The timeout specified has expired: [client ip.local.net.12:60786] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:49:42.312605 2024] [proxy_fcgi:error] [pid 640:tid 139654569367232] (70007)The timeout specified has expired: [client ip.local.net.12:60770] AH01075: Error dispatching request to : (polling)
[Fri Feb 09 12:55:16.997910 2024] [proxy_fcgi:error] [pid 640:tid 139655013983936] (70007)The timeout specified has expired: [client ip.local.net.12:40766] AH01075: Error dispatching request to : (polling)

Journalctl:

Feb 09 13:05:01 nc CRON[2865]: pam_unix(cron:session): session opened for user www-data(uid=33) by (uid=0)
Feb 09 13:05:01 nc CRON[2866]: (www-data) CMD (php -f /var/www/html/nextcloud/cron.php)
Feb 09 13:05:04 nc CRON[2865]: pam_unix(cron:session): session closed for user www-data
Feb 09 13:09:01 nc CRON[2883]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Feb 09 13:09:01 nc CRON[2884]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Feb 09 13:09:01 nc CRON[2883]: pam_unix(cron:session): session closed for user root
Feb 09 13:09:01 nc systemd[1]: Starting phpsessionclean.service - Clean php session files...
Feb 09 13:09:01 nc systemd[1]: phpsessionclean.service: Deactivated successfully.
Feb 09 13:09:01 nc systemd[1]: Finished phpsessionclean.service - Clean php session files.
Feb 09 13:10:01 nc CRON[3033]: pam_unix(cron:session): session opened for user www-data(uid=33) by (uid=0)
Feb 09 13:10:01 nc CRON[3034]: (www-data) CMD (php -f /var/www/html/nextcloud/cron.php)
Feb 09 13:10:05 nc CRON[3033]: pam_unix(cron:session): session closed for user www-data

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.

{"reqId":"RuHnfCGq9lIuui4lo76D","level":3,"time":"2024-02-09T15:16:35+00:00","remoteAddr":"ip.local.net.12","user":"david","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/david/90907038/00002","message":"Expected filesize of 103141460 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 33210368 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Linux) mirall/3.11.1git (Nextcloud, opensuse-tumbleweed-6.7.2-1-default ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.5.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 103141460 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 33210368 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":50,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Server.php","line":365,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/remote.php","line":172,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 103141460 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 33210368 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":[],"CustomMessage":"Expected filesize of 103141460 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 33210368 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."},"id":"65c69341c24c8"}

Let’s eliminate the Desktop client from the troubleshooting process (for now) in order to simplify things. Can you find the log entries in your Nextcloud Server log from/around the time period when the above error was generated in the Web UI? (They will reference this filename. Also include 1-2 log entries immediately before and after that entry).

Thank you. That was a good idea.

Unfortunately, the nextcloud.log has nothing useful in it. I’ve included the last two entries in it (at the end).

A weird thing happened on the way to duplicating the problem. I went back into the web interface and listed the files, and found the 240207_1820.mp3 file and tried to delete it. The idea was that if I generate this error in the front-end, it would probably generate a log entry in the back-end.

Previously, I would very quickly get the Error deleting file message.

The bad news is that it did not generate a log entry on the back-end. But this time, it paused with the throbber spinning. I let it spin for two or three minutes, at least. IIRC, it did eventually get to Error deleting file "240207_1820.mp3".

I thought to myself that perhaps reinitializing everything to a fresh state might help, so I rebooted my Nextcloud server. I went back in to delete the file again (trying to generate that log file entry) but I found that the file was successfully deleted (temporarily). It was gone, from both the web interface and from /var/www/html/nextcloud/data

Something about having to pause during the deletion caused Nextcloud to successfully delete the file, even though it timed out and reported an error in the web interface.

Life on life’s terms meant I had to step away from the troubleshooting. I’m back, after seven hours, and the original file (the too large one) is back.

Normally, I’d think that it was the client that re-uploaded the file during a client sync cycle, but the file as shown in the local sync directory is the smaller post-editing one. This makes me think that there is a cache somewhere that the server must be pulling from. There is a different machine where these files normally originate from, but it is powered off, and has been for a couple of days now. If it helps, I don’t use file versioning, and if it is turned on, I would not mind turning it off.

Thank you for any guidance you can provide.

Here’s the last log entry from yesterday and the one log entry from today:

{"reqId":"SuG17AZRqyXOooQxPcse","level":2,"time":"2024-02-09T21:55:23+00:00","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":"Could not fetch structure detail data to enhance message previews: Error connecting to mail server.","userAgent":"--","version":"27.1.5.1","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Error connecting to mail server.","Code":11,"Trace":[{"file":"/var/www/html/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":375,"function":"_connect","class":"Horde_Imap_Client_Socket","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/IMAP/ImapClientRateLimitingDecorator.php","line":73,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"OCA\\Mail\\IMAP\\ImapClientRateLimitingDecorator","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2510,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2493,"function":"_fetchWrapper","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/IMAP/MessageMapper.php","line":873,"function":"fetch","class":"Horde_Imap_Client_Base","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/IMAP/PreviewEnhancer.php","line":86,"function":"getBodyStructureData","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/Service/PreprocessingService.php","line":83,"function":"process","class":"OCA\\Mail\\IMAP\\PreviewEnhancer","type":"->"},{"file":"/var/www/html/nextcloud/apps/mail/lib/BackgroundJob/PreviewEnhancementProcessingJob.php","line":94,"function":"process","class":"OCA\\Mail\\Service\\PreprocessingService","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/html/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/html/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":607,"message":"Could not fetch structure detail data to enhance message previews: Error connecting to mail server.","exception":{"details":"[110] Connection timed out","logged":false,"raw_msg":"Error connecting to mail server."},"CustomMessage":"Could not fetch structure detail data to enhance message previews: Error connecting to mail server."}}
{"reqId":"FbyEgaUURbeqrsAxwOyV","level":3,"time":"2024-02-10T15:59:01+00:00","remoteAddr":"ip.local.net.12","user":"--","app":"core","method":"GET","url":"/index.php/apps/calendar/timeGridWeek/now","message":"Renewing session token failed: Token does not exist: token does not exist","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"27.1.5.1","exception":{"Exception":"OC\\Authentication\\Exceptions\\InvalidTokenException","Message":"Token does not exist: token does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":225,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OC\\Authentication\\Token\\{closure}","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":224,"function":"atomic","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/Manager.php","line":170,"function":"renewSessionToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":904,"function":"renewSessionToken","class":"OC\\Authentication\\Token\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1147,"function":"loginWithCookie","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/base.php","line":1057,"function":"handleLogin","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","Line":177,"Previous":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"token does not exist","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":168,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenMapper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":225,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OC\\Authentication\\Token\\{closure}","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":224,"function":"atomic","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Authentication/Token/Manager.php","line":170,"function":"renewSessionToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":904,"function":"renewSessionToken","class":"OC\\Authentication\\Token\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1147,"function":"loginWithCookie","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/base.php","line":1057,"function":"handleLogin","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenMapper.php","Line":89},"message":"Renewing session token failed: Token does not exist: token does not exist","user":"david","exception":{},"CustomMessage":"Renewing session token failed: Token does not exist: token does not exist"}}

I will follow up on this: the problem went away on its own after I shut down the sync client on my Linux machine for a little while. It appears that there was something in it that would not let go of the old file it wanted to sync in, but by giving the server some relief, whatever process it was, managed to catch up.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.