[webdav] Fatal: Sabre\DAV\Exception\BadRequest

Just setup NC in docker this evening by following https://blog.linuxserver.io/2019/04/25/letsencrypt-nginx-starter-guide/#nextcloudsubdomainreverseproxyexample, and sunk about 4 hours so far into trying to work out why its having trouble uploading. Getting the following error for lots of files:

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: Expected filesize of 1217363 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 196608 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. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
   OCA\DAV\Connector\Sabre\File->put(null)
1. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   OCA\DAV\Connector\Sabre\Directory->createFile("DSC_0294.JPG", null)
2. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   Sabre\DAV\Server->createFile("files/C92DA57C- ... G", null, null)
3. <<closure>>
   Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /config/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /config/www/nextcloud/apps/dav/lib/Server.php line 319
   Sabre\DAV\Server->exec()
8. /config/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
9. /config/www/nextcloud/remote.php line 165
   require_once("/config/www/nex ... p")

PUT /remote.php/dav/files/C92DA57C-F4EA-4537-BB07-EF0C95722152/Phone%20Pictures/2018/08/DSC_0294.JPG
from 192.168.20.101 by C92DA57C-F4EA-4537-BB07-EF0C95722152 at 2020-03-19T21:39:59+00:00

Googling shows that this problem isn’t uncommon, but its one of those that appears to have a million solutions. I’ve confirmed uploading via the webpage is fine, so its only the clients (specifically WebDAV?) that are broken. I’ve checked php.ini and the file size attributes are set ok there. The Nginx config has client_max_body_size 0; set. At first I thought it was just files larger than 10mb, but I’ve since noticed some above 1mb failing.

Does anyone have any suggestions on where to go next/what other log files I can check?

Thanks

Ok think I found the problem.

I came back to it this morning with a fresh set of eyes. Tried to SSH to the docker server - access denied… wtf? Could only login via root on the console. Started trying to troubleshoot this SSH issue, as my blood pressure is gradually getting higher - what is going on? Confirmed AD integration was fine - putting in the wrong password incremented the badPwdCount attribute. Started to look at dialing up the logging, and needed to install sssd-tools: one sudo apt install sssd-tools command later and I get an error message about not enough space… ah. That explains not being able to login. Increased the size of the LV by following: https://serverfault.com/a/392113

That fixed not being able to login. Went back to Nextcloud and things had started moving again… looks like running out of space on the root partition had sunk it.