HTTP Error 503 when downloading Files from external Share (SMB / CIFS)

i have setup an ubuntu vm with nextcloud 13 and attached an external storage (cifs/smb)
i can browse through the folder structure of the smb share using nextcloud and it is possible to download small files (less than 20KB)
when i try to download larger files (larger than about 20KB) i get an “HTTP ERROR 503”

i tried to disable the redis cache, but it didn’t help
someone else seems to have a similar problem: Unable to download larger files from SMB share

does someone have a solution for this issue?
can someone tell me, where to configure what smb client nextcloud is using and where to configure it?

ubuntu version 16.04
nextcloud version 13.0.1
smb share: windows server 2016

config.php (passwords changed):

[quote]<?php
$CONFIG = array (
‘passwordsalt’ => ‘xxx’,
‘secret’ => ‘xxx’,
‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ‘10.82.0.59’,
2 => ‘nextcloud’,
),
‘datadirectory’ => ‘/var/ncdata’,
‘overwrite.cli.url’ => ‘http://localhost’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘13.0.1.1’,
‘dbname’ => ‘nextcloud_db’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘oc_ncadmin’,
‘dbpassword’ => ‘xxx’,
‘installed’ => true,
‘instanceid’ => ‘oct3tct3f1ya’,
‘maintenance’ => false,
‘mail_smtpmode’ => ‘smtp’,
‘log_rotate_size’ => ‘10485760’,
‘htaccess.RewriteBase’ => ‘/’,
‘ldapIgnoreNamingRules’ => false,
‘ldapProviderFactory’ => ‘\OCA\User_LDAP\LDAPProviderFactory’,
‘skeletondirectory’ => ‘’,
‘log_type’ => ‘file’,
‘logfile’ => ‘/var/log/nextcloud.log’,
‘loglevel’ => 0,
‘logtimezone’ => ‘Europe/Vienna’,
);[/quote]

Nextcloud Log:

[quote]“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:4,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“webdav”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Exception: {“Exception”:“Sabre\\DAV\\Exception\\ServiceUnavailable”,“Message”:“Could not open file”,“Code”:0,“Trace”:”#0 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(85): OCA\\DAV\\Connector\\Sabre\\File->get()\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit(‘method:GET’, Array)\n#4 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(80): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/nextcloud\/remote.php(164): require_once(’\/var\/www\/nextcl…’)\n#7 {main}",“File”:"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php",“Line”:337}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/jquery-ui-fixes.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/server.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/share.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/jquery.ocdialog.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/styles.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}
{“reqId”:“d3dg8VeVXY6CvmckBMzs”,“level”:0,“time”:“2018-04-10T09:41:16+02:00”,“remoteAddr”:“10.155.10.170”,“user”:“0603EDE0-BAC6-4DD9-81F4-2BCABF24D5B6”,“app”:“core”,“method”:“GET”,“url”:"/remote.php/webdav/PATH/TO/FILE/File.doc",“message”:“Scss is disabled for /var/www/nextcloud/core/css/header.scss, ignoring”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36”,“version”:“13.0.1.1”}[/quote]

Apache Log:

[quote][Tue Apr 10 09:41:15.496949 2018] [ssl:debug] [pid 1602] ssl_engine_kernel.c(354): [client 10.155.10.170:57052] AH02034: Subsequent (No.2) HTTPS request received for child 9 (server 127.0.1.1:443)
[Tue Apr 10 09:41:15.504271 2018] [ssl:info] [pid 1473] [client 10.155.10.170:57055] AH01964: Connection to child 3 established (server 127.0.1.1:443)
[Tue Apr 10 09:41:15.504712 2018] [ssl:debug] [pid 1473] ssl_engine_kernel.c(2124): [client 10.155.10.170:57055] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[Tue Apr 10 09:41:15.504731 2018] [core:debug] [pid 1473] protocol.c(2208): [client 10.155.10.170:57055] select protocol from , choices=h2,http/1.1 for server 127.0.1.1
[Tue Apr 10 09:41:15.504741 2018] [ssl:debug] [pid 1473] ssl_engine_kernel.c(2124): [client 10.155.10.170:57055] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[Tue Apr 10 09:41:15.504955 2018] [ssl:info] [pid 1617] [client 10.155.10.170:57054] AH01964: Connection to child 8 established (server 127.0.1.1:443)
[Tue Apr 10 09:41:15.505785 2018] [ssl:debug] [pid 1617] ssl_engine_kernel.c(2124): [client 10.155.10.170:57054] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[Tue Apr 10 09:41:15.505805 2018] [core:debug] [pid 1617] protocol.c(2208): [client 10.155.10.170:57054] select protocol from , choices=h2,http/1.1 for server 127.0.1.1
[Tue Apr 10 09:41:15.505814 2018] [ssl:debug] [pid 1617] ssl_engine_kernel.c(2124): [client 10.155.10.170:57054] AH02645: Server name not provided via TLS extension (using default/first virtual host)
[Tue Apr 10 09:41:15.512063 2018] [ssl:debug] [pid 1473] ssl_engine_kernel.c(2023): [client 10.155.10.170:57055] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
[Tue Apr 10 09:41:15.512133 2018] [ssl:info] [pid 1473] (70014)End of file found: [client 10.155.10.170:57055] AH01991: SSL input filter read failed.
[Tue Apr 10 09:41:15.512212 2018] [ssl:debug] [pid 1473] ssl_engine_io.c(1017): [client 10.155.10.170:57055] AH02001: Connection closed to child 3 with standard shutdown (server 127.0.1.1:443)
[Tue Apr 10 09:41:15.513004 2018] [ssl:debug] [pid 1617] ssl_engine_kernel.c(2023): [client 10.155.10.170:57054] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
[Tue Apr 10 09:41:15.513074 2018] [ssl:info] [pid 1617] (70014)End of file found: [client 10.155.10.170:57054] AH01991: SSL input filter read failed.
[Tue Apr 10 09:41:15.513138 2018] [ssl:debug] [pid 1617] ssl_engine_io.c(1017): [client 10.155.10.170:57054] AH02001: Connection closed to child 8 with standard shutdown (server 127.0.1.1:443)
[Tue Apr 10 09:41:16.101351 2018] [ssl:debug] [pid 1602] ssl_engine_io.c(1017): [client 10.155.10.170:57052] AH02001: Connection closed to child 9 with standard shutdown (server 127.0.1.1:443)
[Tue Apr 10 09:41:16.305224 2018] [ssl:info] [pid 1596] (70007)The timeout specified has expired: [client 10.155.10.170:57045] AH01991: SSL input filter read failed.
[Tue Apr 10 09:41:16.305361 2018] [ssl:debug] [pid 1596] ssl_engine_io.c(1017): [client 10.155.10.170:57045] AH02001: Connection closed to child 7 with standard shutdown (server 127.0.1.1:443)
[Tue Apr 10 09:41:16.572459 2018] [ssl:info] [pid 1604] (70007)The timeout specified has expired: [client 10.155.10.170:57051] AH01991: SSL input filter read failed.
[Tue Apr 10 09:41:16.572646 2018] [ssl:debug] [pid 1604] ssl_engine_io.c(1017): [client 10.155.10.170:57051] AH02001: Connection closed to child 11 with standard shutdown (server 127.0.1.1:443)[/quote]

Update:
i mounted a windows server 2008R2 smb share and i can download files of any size without issues

is there probably a problem with smb 3.1?

installed packages on ubuntu:
libsmbclient/xenial-updates,xenial-security,now 2:4.3.11+dfsg-0ubuntu0.16.04.13 amd64 [installed,automatic]
php-smbclient/xenial-updates,now 0.8.0~rc1-2build1 amd64 [installed]

Have found the solution for the problem, maybe this can also help you.

1 Like