Can't get Nextcloud 16 uploads running locally for some reason

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.0
Operating system and version (eg, Ubuntu 17.04): Ubuntu Server 18.04.1
Apache or nginx version (eg, Apache 2.4.25): nginx 1.15.12
PHP version (eg, 7.1): PHP 7.2.17-0ubuntu0.18.04.1

The issue you are facing: I setup nextcloud using two different tutorials both ending in the same issues I currently face… so I’m desperately looking for help. I setup a Nextcloud Server using Let’s Encrypt, Redis and MariaDB… then tried it out without installing any additional addins, it uploads small files just fine but if I go bigger, say 20 mb to 200 mb it randomly aborts and I get log errors like these:

"Exception": "Sabre\DAV\Exception\BadRequest",
"Message": "expected filesize 10485760 got 1908736",

Googling it was no help… and when I asked a friend to upload anything big to it, he was successful. So I attempted the same using 1. the local hostname of the nextcloud server and 2. the domain name (U-turn works). I randomly get disconnects on my site no matter which way I go.

The ports being forwarded is 80 and 443.

So I thought maybe it’s the network card. Nope, PC is fine because I tried out 3 other PCs and 2 of them are directly connected to the router itself.

If it works from the internet, can it be a Nextcloud issue or am I facing some weird networking issues?..
The Nextcloud Installation of my company works just fine (It is located on another site).

And I’ve tried different browsers as well, all of them showing the same issue.

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

Steps to replicate it:

  1. Installation according to this tutorial: https://decatec.de/home-server/nextcloud-auf-ubuntu-server-18-04-lts-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/ (It is in german but the code part is most important I guess…)
  2. Try uploading anything from the local site and see if it fails
  3. Attempt the same from another location.

I get 2 error messages in Nextcloud btw. I seperated them below.
The output of your Nextcloud log in Admin > Logging:

{"reqId":"oHKMEItN7knw1ABn0yab","level":4,"time":"2019-05-08T19:48:03+02:00","remoteAddr":"[Redacted for privacy]","user":"aeh","app":"webdav","method":"PUT","url":"/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 10485760 got 1859584","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":163,"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":222,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0","version":"16.0.0.9","id":"5cd31acfca31f"}


{"reqId":"oHKMEItN7knw1ABn0yab","level":3,"time":"2019-05-08T19:48:03+02:00","remoteAddr":"[Redacted for privacy]","user":"aeh","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 10485760 got 1859584","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0",null]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"http://[Redacted for safety]/remote.php/dav/uploads/aeh/web-file-upload-82ea935a1f31e2a4dcc95512db46e6cf-1557337678924/0","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":163,"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":222,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0","version":"16.0.0.9","id":"5cd31acfca5f2"}

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

<?php
$CONFIG = array (
  'instanceid' => '[Redacted for safety]',
  'passwordsalt' => '[Redacted for safety]',
  'secret' => '[Redacted for safety]',
  'trusted_domains' =>
  array (
    0 => '[Redacted for safety]',
    1 => '192.168.178.101',
    2 => 'nextcloudserver',
  ),
  'datadirectory' => '/var/nextcloud_data/',
  'dbtype' => 'mysql',
  'version' => '16.0.0.9',
  'overwrite.cli.url' => 'https://[Redacted for safety]',
  'dbname' => '[Redacted for safety]',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '[Redacted for safety]',
  'dbpassword' => '[Redacted for safety]',
  'installed' => true,
  'maintenance' => false,
  'memcache.local' => '\OC\Memcache\APCu',
  'overwriteprotocol' => 'https',
  'logtimezone' => 'Europe/Berlin',
  'auth.bruteforce.protection.enabled' => false,
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array(
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
);

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

Nothing interesting there because the issue doesn't throw anything for me in there.