Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload files to webdav with a size > 1 Mb #12728

Closed
Stivino opened this issue Nov 29, 2018 · 12 comments
Closed

Can't upload files to webdav with a size > 1 Mb #12728

Stivino opened this issue Nov 29, 2018 · 12 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: dav needs info

Comments

@Stivino
Copy link

Stivino commented Nov 29, 2018

Steps to reproduce

  1. Include an external webDav storage to nextcloud
  2. Drag & Drop a file greater than 1 Mb into a folder of the external storage
  3. Get an error

Expected behaviour

File should be uploaded.

Actual behaviour

I get an info box after the file is read. It says:
Sabre\DAV\Exception: Client error: PUT http://192.168.178.50/webdav/Volume_1/music/Leonard%20Cohen/01%20-%20Avalanche.mp3.ocTransferId345433901.part resulted in a 417 Expectation Failed response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...)

Server configuration

Nextcloud
Version: 14.0.4.2
Installierte Apps: 38
Apps mit verfügbaren Aktualisierungen: 0

PHP
Version: 7.0.30
Arbeitspeicher-Grenzwert: 512 MB
Maximale Ausführungszeit: 3600
Maximale Größe zum Hochladen: 1 GB

Operating system:
Raspbian

Web server:
Apache/2.4.25

Database:
mysql
10.1.23

Nextcloud version: (see Nextcloud admin page)
14.0.4.2

Where did you install Nextcloud from:

No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.0.1
  - activity: 2.7.0
  - audioplayer: 2.4.1
  - calendar: 1.6.4
  - cloud_federation_api: 0.0.1
  - comments: 1.4.0
  - dav: 1.6.0
  - federatedfilesharing: 1.4.0
  - federation: 1.4.0
  - files: 1.9.0
  - files_external: 1.5.0
  - files_pdfviewer: 1.3.2
  - files_sharing: 1.6.2
  - files_texteditor: 2.6.0
  - files_trashbin: 1.4.1
  - files_versions: 1.7.1
  - files_videoplayer: 1.3.0
  - firstrunwizard: 2.3.0
  - gallery: 18.1.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.2.0
  - mail: 0.11.0
  - metadata: 0.8.0
  - nextcloud_announcements: 1.3.0
  - notifications: 2.2.1
  - oauth2: 1.2.1
  - password_policy: 1.4.0
  - provisioning_api: 1.4.0
  - radio: 0.6.3
  - serverinfo: 1.4.0
  - sharebymail: 1.4.0
  - support: 1.0.0
  - survey_client: 1.2.0
  - systemtags: 1.4.0
  - theming: 1.5.0
  - twofactor_backupcodes: 1.3.1
  - updatenotification: 1.4.1
  - workflowengine: 1.4.0
Disabled:
  - admin_audit
  - encryption
  - onlyoffice
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
</details>

**Are you using external storage, if yes which one:**
yes, local webDav

**Are you using encryption:** no

**Are you using an external user-backend, if yes which one:** Webdav

Client configuration

Browser:
Chrome

Operating system:
Windows 10 64 bit. Also not working in nextcloud app

Logs

Web server error log

Web server error log
Fatal | webdav | Sabre\DAV\Exception: Client error: `PUT http://192.168.178.50/webdav/Volume_1/music/Leonard%20Cohen/01%20-%20Avalanche.mp3.ocTransferId345433901.part` resulted in a `417 Expectation Failed` response: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...)/var/www/nextcloud.stevenweber.de/apps/dav/lib/Connector/Sabre/File.php - line 200:OCA\DAV\Connector\Sabre\File->convertToSabreException(GuzzleHttp\E ... {})/var/www/nextcloud.stevenweber.de/apps/dav/lib/Connector/Sabre/Directory.php - line 156:OCA\DAV\Connector\Sabre\File->put(null)/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 314:OCA\DAV\Connector\Sabre\Directory->createFile("01 - Avalanche.mp3", null)/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 130:Sabre\DAV\Tree->copyNode(OCA\DAV\Upload\FutureFile {}, OCA\DAV\Conn ... {}, "01 - Avalanche.mp3")/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 161:Sabre\DAV\Tree->copy("uploads/Ste ... e", "files/Steve ... 3")/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 646:Sabre\DAV\Tree->move("uploads/Ste ... e", "files/Steve ... 3")Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/var/www/nextcloud.stevenweber.de/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:Sabre\Event\EventEmitter->emit("method:MOVE", [ Sabre\HTTP ... }])/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/var/www/nextcloud.stevenweber.de/apps/dav/lib/Server.php - line 293:Sabre\DAV\Server->exec()/var/www/nextcloud.stevenweber.de/apps/dav/appinfo/v2/remote.php - line 35:OCA\DAV\Server->exec()/var/www/nextcloud.stevenweber.de/remote.php - line 163:require_once("/var/www/ne ... p")Eingefasst vonGuzzleHttp\Exception\ClientException: Client error: `PUT http://192.168.178.50/webdav/Volume_1/music/Leonard%20Cohen/01%20-%20Avalanche.mp3.ocTransferId345433901.part` resulted in a `417 Expectation Failed` response: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...)/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/guzzle/src/Middleware.php - line 65:GuzzleHttp\Exception\RequestException::create(GuzzleHttp\Psr7\Request {}, "*** sensiti ... *")/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 203:GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensiti ... *")/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 156:GuzzleHttp\Promise\Promise::callHandler(1, "*** sensiti ... *", [ GuzzleHttp ... l])/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/TaskQueue.php - line 47:GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}("*** sensiti ... *")/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 246:GuzzleHttp\Promise\TaskQueue->run(true)/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 223:GuzzleHttp\Promise\Promise->invokeWaitFn()/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 267:GuzzleHttp\Promise\Promise->waitIfPending()/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 225:GuzzleHttp\Promise\Promise->invokeWaitList()/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/promises/src/Promise.php - line 62:GuzzleHttp\Promise\Promise->waitIfPending()/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/guzzle/src/Client.php - line 131:GuzzleHttp\Promise\Promise->wait()/var/www/nextcloud.stevenweber.de/lib/private/Http/Client/Client.php - line 266:GuzzleHttp\Client->request("put", "http://192. ... t", { verify: "/ ... e})/var/www/nextcloud.stevenweber.de/lib/private/Files/Storage/DAV.php - line 504:OC\Http\Client\Client->put("http://192. ... t", { body: null ... ]})/var/www/nextcloud.stevenweber.de/lib/private/Files/Storage/DAV.php - line 411:OC\Files\Storage\DAV->uploadFile("/tmp/oc_tmp_DfaKgt-.part", "Leonard Coh ... t")/var/www/nextcloud.stevenweber.de/lib/private/Files/Storage/DAV.php - line 402:OC\Files\Storage\DAV->writeBack("/tmp/oc_tmp_DfaKgt-.part", "Leonard Coh ... t")OC\Files\Storage\DAV->OC\Files\Storage\{closure}("*** sensiti ... *")/var/www/nextcloud.stevenweber.de/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php - line 109:call_user_func(Closure {})Icewind\Streams\CallbackWrapper->stream_close()/var/www/nextcloud.stevenweber.de/apps/dav/lib/Connector/Sabre/File.php - line 175:fclose(null)/var/www/nextcloud.stevenweber.de/apps/dav/lib/Connector/Sabre/Directory.php - line 156:OCA\DAV\Connector\Sabre\File->put(null)/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 314:OCA\DAV\Connector\Sabre\Directory->createFile("01 - Avalanche.mp3", null)/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 130:Sabre\DAV\Tree->copyNode(OCA\DAV\Upload\FutureFile {}, OCA\DAV\Conn ... {}, "01 - Avalanche.mp3")/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Tree.php - line 161:Sabre\DAV\Tree->copy("uploads/Ste ... e", "files/Steve ... 3")/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 646:Sabre\DAV\Tree->move("uploads/Ste ... e", "files/Steve ... 3")Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/var/www/nextcloud.stevenweber.de/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:Sabre\Event\EventEmitter->emit("method:MOVE", [ Sabre\HTTP ... }])/var/www/nextcloud.stevenweber.de/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})/var/www/nextcloud.stevenweber.de/apps/dav/lib/Server.php - line 293:Sabre\DAV\Server->exec()/var/www/nextcloud.stevenweber.de/apps/dav/appinfo/v2/remote.php - line 35:OCA\DAV\Server->exec()/var/www/nextcloud.stevenweber.de/remote.php - line 163:require_once("/var/www/ne ... p")
-- | -- | --

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #3738 (Webdav), #7999 (Cannot upload 11.1 MB jpeg with nextcloud client), #3628 (Cannot upload files using webdav extension.), #10184 (Uploading medium size files fails), and #1371 (No file-uploading possible at all).

@Stivino
Copy link
Author

Stivino commented Nov 29, 2018

Could not solve it with the linked issues.

@Stivino
Copy link
Author

Stivino commented Nov 29, 2018

Additional Info:
In my default storage everything works like a charm, even though my default storage itself is an webDav storage on the same destination.

@ChristophWurst
Copy link
Member

Are you sure your Nextcloud and web server are configured to allow large file uploads? Ref http://php.net/manual/en/ini.core.php#ini.post-max-size

@ChristophWurst ChristophWurst added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Nov 29, 2018
@Stivino
Copy link
Author

Stivino commented Nov 30, 2018

Yes, I set this up. And it's working, but not for the external storage. Any ideas?

@ChristophWurst
Copy link
Member

Please enable debug mode and check your nextcloud.log for more info.

@ChristophWurst
Copy link
Member

I see a HTTP status 417. That might be the issue. Could you check errors on that external storage? Does it refuse the file for some reason?

@Stivino
Copy link
Author

Stivino commented Dec 1, 2018

EDIT:
{"reqId":"CrC9U6ghI4ozA1Ux4ZCb"
"level":3
"time":"2018-12-01T20:50:34+00:00"
"remoteAddr":"95.88.159.44"
"user":"Steven"
"app":"no app in context"
"method":"MOVE"
"url":"/remote.php/dav/uploads/Steven/web-file-upload-c454317c445d3543c2cf38f8b6ab9e35-1543697420868/.file"
"message":{"Exception":"GuzzleHttp\Exception\ClientException"
"Message":"Client error: PUT http:\/\/192.168.178.50\/webdav\/Volume_1\/music\/Leonard%20Cohen\/Songs%20Of%20Love%20And%20Hate\/Perhaps%20Vampires%20Is%20a%20Bit%20Strong%20But....mp3.ocTransferId991399835.part resulted in a 417 Expectation Failed response:\n\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n "htt (truncated...)\n"
"Code":417
"Trace":[{"file":"/var/www/nextcloud.stevenweber.de/3rdparty/guzzlehttp/guzzle/src/Middleware.php"
"line":65
"function":"create"
"class":"GuzzleHttp\Exception\RequestException"
"type":"::"
"args":[{"class":"GuzzleHttp\Psr7\Request"}
"*** sensitive parameter replaced ***"]}

What do you think?

@ChristophWurst
Copy link
Member

Could you check errors on that external storage? Does it refuse the file for some reason?

You posted the logs of your Nextcloud. You have to look into the logs of the local webdav server that refused the file.

@Stivino
Copy link
Author

Stivino commented Dec 5, 2018

My DLINK Nas is very silent, sadly. But i solved it with an NFS mount instead of an WebDav mount. Coriously it's working like a charm now.

@ChristophWurst
Copy link
Member

Okay, that is a pitty.

Closing since we cannot debug this any further without that info. Thank you for your report ✌️

@Bushrider
Copy link

Bushrider commented Mar 31, 2020

Hi, i'm facing the exact same issue and trying to resolve it for days now.
I'm almost sure this is not a Nas problem cause connected directly to the Nas through Nautilus using webdav works fine, i can upload files>1Mb .
I'm pretty sure this is not a server config problem too cause it was running Apache, moving to Nginx didn't resolve the issue, i can upload without any problem large files through this server on another website too. (exact same files)
PHP uploads and memory limits are correct as shown in the admin==>System panel
I read some relevant posts over the internet, one was mentionning proxy parameter but i can figure out where to search for it, but i really doubt that it is the root of the problem.
nextcloud.log
Issue can be reproduced using WebUI, Desktop Client ans Android App when uploading a file > 1Mb using webdav protocol.
The problem exists only when using the SabreDav connector i think ...

Debian 8
Nginx 1.15.12-1
Php7.4-fpm 7.4.4-1
Nextcloud version: 18.0.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: dav needs info
Projects
None yet
Development

No branches or pull requests

4 participants