Nextcloud version (eg, 20.0.5): 26.0.1 (NextcloudPi Installation)
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 11 (bullseye)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.56
PHP version (eg, 7.4): PHP 8.1.18
mysql version 10.5.19
The issue you are facing:
All of my files, about 256gb, just vanished without a trace. No recovery folder as referenced here.
The long version:
Summary
This has happened twice in the past few days. The first while my client was in the middle of uploading photos and videos from my mobile device client (Mid upload I got a toast notification in the client saying “cannot upload “file” to “photo folder” because “photo folder” no longer exists”).
The second time (after I loaded a full dd
image backup of the server, it happened again. I had re-uploaded all the photos and videos from my mobile device (which were not in the backup) and everything seemed fine. I wake up the next morning to check on my server, poof! Everything is gone again.
At first I wondered if my files were just moved somehow but even the automatic backups of my server reflect their absence (before this happened the backup was 256gb and now it’s 878mb).
Then I wondered if an update of nextcloudpi somehow deleted the files but after loading a backup (and before they all got deleted the second time) I manually ran a nextcloudpi update and all the files were still there. When they vanished the second time, no updates were in progress. Nor were any autobackups as far as I can tell.
What could possibly cause this and how can I troubleshoot? I’m completely at sea here. Could it be some kind of database corruption?
Is this the first time you’ve seen this error? (Y/N): Yes
Things I’ve tried:
-
Loading a
dd
backup and uploading the photos/videos from the mobile client to the server. Over night ALL the files vanished again. -
issuing
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
. Nothing found. -
Combing the file tree of the server over ssh to see if the files just got moved. They are gone.
Steps to replicate it:
- Loaded a complete
dd
backup image of the server - re-uploaded the same photos and videos from mobile client to server that I was uploading when it happened the first time
The output of your Nextcloud log in Admin > Logging:
I see 4 errors in the log what would have happened around the time window that the files vanished but I’m not sure what they mean.
Summary
[index] Error: Exception: OC\Core\Controller\WebAuthnController::finishAuthentication(): Argument #1 ($data) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 230 in file '/var/www/nextcloud/core/Controller/WebAuthnController.php' line 93 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
2. /var/www/nextcloud/lib/base.php line 1056
OC\Route\Router->match()
3. /var/www/nextcloud/index.php line 36
OC::handleRequest()
Caused by:
TypeError: OC\Core\Controller\WebAuthnController::finishAuthentication(): Argument #1 ($data) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 230 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OC\Core\Controller\WebAuthnController->finishAuthentication()
1. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
2. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
3. /var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
4. /var/www/nextcloud/lib/base.php line 1056
OC\Route\Router->match()
5. /var/www/nextcloud/index.php line 36
OC::handleRequest()
POST /index.php/login/webauthn/finish
from at 2023-07-31T22:18:30+00:00
[no app in context] Error: Sabre\DAV\Exception\BadRequest: Expected filesize of 3150206 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 81920 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. at <<closure>>
0. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 149
OCA\DAV\Connector\Sabre\File->put()
1. /var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php line 50
OCA\DAV\Connector\Sabre\Directory->createFile("*** sensitive parameters replaced ***")
2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
OCA\DAV\Upload\UploadFolder->createFile("*** sensitive parameters replaced ***")
3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
Sabre\DAV\Server->createFile("*** sensitive parameters replaced ***")
4. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
Sabre\DAV\CorePlugin->httpPut()
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
Sabre\DAV\Server->emit()
6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
Sabre\DAV\Server->invokeMethod()
7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
Sabre\DAV\Server->start()
8. /var/www/nextcloud/apps/dav/lib/Server.php line 366
Sabre\DAV\Server->exec()
9. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
10. /var/www/nextcloud/remote.php line 172
require_once("/var/www/nextcl ... p")
PUT /remote.php/dav/uploads/user/5a9767532e2820d223050122c9d31a31/0000000000000000-0000000003150206
from by at 2023-08-01T01:04:30+00:00
{"reqId":"ZMh00vZWrg5MLgzHBD3jBgAAAAc","level":3,"time":"2023-08-01T02:59:30+00:00","remoteAddr":"","user":"","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/user/cbc3c028135ac29bc768d9f6b06254ab/0000000000000000-0000000003995172","message":"Expected filesize of 3995172 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3039232 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 (Android) Nextcloud-android/3.25.0","version":"26.0.1.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 3995172 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3039232 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/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/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/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/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 3995172 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3039232 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 3995172 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3039232 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."},"id":"64c967ac4f69c"}
[index] Error: Exception: OC\Core\Controller\WebAuthnController::finishAuthentication(): Argument #1 ($data) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 230 in file '/var/www/nextcloud/core/Controller/WebAuthnController.php' line 93 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
2. /var/www/nextcloud/lib/base.php line 1056
OC\Route\Router->match()
3. /var/www/nextcloud/index.php line 36
OC::handleRequest()
Caused by:
TypeError: OC\Core\Controller\WebAuthnController::finishAuthentication(): Argument #1 ($data) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 230 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
OC\Core\Controller\WebAuthnController->finishAuthentication()
1. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
OC\AppFramework\Http\Dispatcher->executeController()
2. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
OC\AppFramework\Http\Dispatcher->dispatch()
3. /var/www/nextcloud/lib/private/Route/Router.php line 315
OC\AppFramework\App::main()
4. /var/www/nextcloud/lib/base.php line 1056
OC\Route\Router->match()
5. /var/www/nextcloud/index.php line 36
OC::handleRequest()
POST /index.php/login/webauthn/finish
from at 2023-08-01T15:18:09+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
Summary
<?php
'datadirectory' => '/var/www/nextcloud/data/data',
'dbtype' => 'mysql',
'version' => '26.0.1.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncadmin',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
),
'tempdirectory' => '/var/www/nextcloud/data/data/tmp',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'admin',
'mail_domain' => 'ownyourbits.com',
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'overwriteprotocol' => 'https',
'maintenance' => false,
'logfile' => '/var/www/nextcloud/data/data/nextcloud.log',
'trusted_proxies' =>
'theme' => '',
'loglevel' => '2',
'log_type' => 'file',
'enforce_theme' => '',
);
The output of your Apache/nginx/system log in /var/log/____
:
Summary
[Tue Aug 01 16:14:22.555817 2023] [access_compat:error] [pid 56242:tid 548154147200] [remote] AH01797: client denied by server configuration: /var/www/nextcloud/data/data/.ocdata
[Mon Jul 31 20:25:06.593043 2023] [proxy_fcgi:error] [pid 2644:tid 547641864576] [client] AH01071: Got error 'Primary script unknown'
[Mon Jul 31 20:25:07.055921 2023] [proxy_fcgi:error] [pid 2644:tid 547667042688] [client] AH01071: Got error 'Primary script unknown'
[Mon Jul 31 20:55:11.876238 2023] [authz_core:error] [pid 2644:tid 547633463680] [client] AH01630: client denied by server configuration: /var/www/nextcloud/server-status
[Mon Jul 31 20:55:16.563604 2023] [proxy_fcgi:error] [pid 2644:tid 547532824960] [client] AH01071: Got error 'Primary script unknown'
[Mon Jul 31 20:55:21.061836 2023] [proxy_fcgi:error] [pid 2645:tid 547893596544] [client] AH01071: Got error 'Primary script unknown'
[Mon Jul 31 21:04:30.981059 2023] [proxy_fcgi:error] [pid 2645:tid 547272782208] (70008)Partial results are valid but processing is incomplete: [client] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 31 22:00:00.656412 2023] [authz_core:error] [pid 2644:tid 546391974272] [client ] AH01630: client denied by server configuration: /var/www/nextcloud/server-status
[Mon Jul 31 22:59:30.915045 2023] [proxy_fcgi:error] [pid 2644:tid 547675435392] (70008)Partial results are valid but processing is incomplete: [client] AH01075: Error dispatching request to : (reading input brigade)
[Mon Jul 31 16:43:15.713100 2023] [mpm_event:notice] [pid 1013:tid 548163716160] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Mon Jul 31 16:43:15.713197 2023] [core:notice] [pid 1013:tid 548163716160] AH00094: Command line: '/usr/sbin/apache2'
[Tue Aug 01 00:00:10.168290 2023] [mpm_event:notice] [pid 1013:tid 548163716160] AH00493: SIGUSR1 received. Doing graceful restart
[Tue Aug 01 00:00:10.220750 2023] [mpm_event:notice] [pid 1013:tid 548163716160] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Tue Aug 01 00:00:10.220842 2023] [core:notice] [pid 1013:tid 548163716160] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 31 16:43:15.670041 2023] [mpm_event:notice] [pid 1013:tid 548163716160] AH00493: SIGUSR1 received. Doing graceful restart
Any help is much appreciated. Thank you in advance!