Internal Server Error when accessing external storage via SMB

Hi,

I got some issues with accessing an external storage via SMB.

I can add the share (that is located on an Win2019) but when I try to access it I keep getting an “internal server error”

My nextcloud is on 18.0.7, I think I have tried everything in https://github.com/nextcloud/server/issues/20622

but no luck

I can access other shares with the same user on the same server, but not this one. Unfortunately, this is the main file share with all the important data on it…

I can access the share from windows explorer without any issues.

Any ideas?

Cheers

Michael

I think we need more details. What about screenshots, logs, configuration, …

Thanks for your reply!

Sure :slight_smile:

Here is a screenshot and the lines from the nextcloud.log

It’s in German, let me know if you need a translation.

{“reqId”:“23eYvFFuL1FAxKxTyPVb”,“level”:4,“time”:“2020-08-20T08:15:03+00:00”,“remoteAddr”:“1.2.3.4”,“user”:“B77CC5B6-0E6E-4772-9595-C0734277D01D”,“app”:“webdav”,“method”:“GET”,“url”:"/nextcloud/remote.php/webdav/Daten",“message”:{“Exception”:“Sabre\DAV\Exception”,“Message”:“Invalid request for /Daten (InvalidTypeException)”,“Code”:0,“Trace”:[{“file”:"/var/www/html/apps/dav/lib/Connector/Sabre/File.php",“line”:418,“function”:“convertToSabreException”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:"->",“args”:[{“class”:“Icewind\SMB\Exception\InvalidTypeException”}]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:85,“function”:“get”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:"->",“args”:[]},{“function”:“httpGet”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php",“line”:105,“function”:“call_user_func_array”,“args”:[[{“class”:“Sabre\DAV\CorePlugin”},“httpGet”],[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:479,“function”:“emit”,“class”:“Sabre\Event\EventEmitter”,“type”:"->",“args”:[“method:GET”,[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:254,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/html/apps/dav/appinfo/v1/webdav.php",“line”:82,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/html/remote.php",“line”:165,“args”:["/var/www/html/apps/dav/appinfo/v1/webdav.php"],“function”:“require_once”}],“File”:"/var/www/html/apps/dav/lib/Connector/Sabre/File.php",“Line”:659,“Previous”:{“Exception”:“Icewind\SMB\Exception\InvalidTypeException”,“Message”:“Invalid request for /Daten (InvalidTypeException)”,“Code”:21,“Trace”:[{“file”:"/var/www/html/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php",“line”:66,“function”:“fromMap”,“class”:“Icewind\SMB\Exception\Exception”,“type”:"::",“args”:[{“1”:“Icewind\SMB\Exception\ForbiddenException”,“2”:“Icewind\SMB\Exception\NotFoundException”,“13”:“Icewind\SMB\Exception\ForbiddenException”,“16”:“Icewind\SMB\Exception\FileInUseException”,“17”:“Icewind\SMB\Exception\AlreadyExistsException”,“20”:“Icewind\SMB\Exception\InvalidTypeException”,“21”:“Icewind\SMB\Exception\InvalidTypeException”,“22”:“Icewind\SMB\Exception\InvalidArgumentException”,“28”:“Icewind\SMB\Exception\OutOfSpaceException”,“39”:“Icewind\SMB\Exception\NotEmptyException”,“103”:“Icewind\SMB\Exception\ConnectionAbortedException”,“104”:“Icewind\SMB\Exception\ConnectionResetException”,“110”:“Icewind\SMB\Exception\TimedOutException”,“111”:“Icewind\SMB\Exception\ConnectionRefusedException”,“112”:“Icewind\SMB\Exception\HostDownException”,“113”:“Icewind\SMB\Exception\NoRouteToHostException”},21,"/Daten"]},{“file”:"/var/www/html/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php",“line”:78,“function”:“handleError”,“class”:“Icewind\SMB\Native\NativeState”,“type”:"->",“args”:["/Daten"]},{“file”:"/var/www/html/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php",“line”:212,“function”:“testResult”,“class”:“Icewind\SMB\Native\NativeState”,“type”:"->",“args”:[false,“smb://fileserver.domain.local/Daten/Daten”]},{“file”:"/var/www/html/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php",“line”:263,“function”:“open”,“class”:“Icewind\SMB\Native\NativeState”,“type”:"->",“args”:[“smb://fileserver.domain.local/Daten/Daten”,“r”]},{“file”:"/var/www/html/apps/files_external/lib/Lib/Storage/SMB.php",“line”:416,“function”:“read”,“class”:“Icewind\SMB\Native\NativeShare”,“type”:"->",“args”:["/Daten"]},{“file”:"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:299,“function”:“fopen”,“class”:“OCA\Files_External\Lib\Storage\SMB”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/Storage/Wrapper/PermissionsMask.php",“line”:118,“function”:“fopen”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:299,“function”:“fopen”,“class”:“OC\Files\Storage\Wrapper\PermissionsMask”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/Storage/Wrapper/Availability.php",“line”:314,“function”:“fopen”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",“line”:299,“function”:“fopen”,“class”:“OC\Files\Storage\Wrapper\Availability”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/View.php",“line”:1160,“function”:“fopen”,“class”:“OC\Files\Storage\Wrapper\Wrapper”,“type”:"->",“args”:["",“r”]},{“file”:"/var/www/html/lib/private/Files/View.php",“line”:996,“function”:“basicOperation”,“class”:“OC\Files\View”,“type”:"->",“args”:[“fopen”,"/Daten",[“read”],“r”]},{“file”:"/var/www/html/apps/dav/lib/Connector/Sabre/File.php",“line”:416,“function”:“fopen”,“class”:“OC\Files\View”,“type”:"->",“args”:[“Daten”,“r”]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",“line”:85,“function”:“get”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:"->",“args”:[]},{“function”:“httpGet”,“class”:“Sabre\DAV\CorePlugin”,“type”:"->",“args”:[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php",“line”:105,“function”:“call_user_func_array”,“args”:[[{“class”:“Sabre\DAV\CorePlugin”},“httpGet”],[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:479,“function”:“emit”,“class”:“Sabre\Event\EventEmitter”,“type”:"->",“args”:[“method:GET”,[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:254,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“absoluteUrl”:“http://3.4.5.6/nextcloud/remote.php/webdav/Daten","class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/var/www/html/apps/dav/appinfo/v1/webdav.php",“line”:82,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/var/www/html/remote.php",“line”:165,“args”:["/var/www/html/apps/dav/appinfo/v1/webdav.php"],“function”:“require_once”}],“File”:"/var/www/html/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php",“Line”:30},“CustomMessage”:"–"},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0”,“version”:“18.0.7.1”}
{“reqId”:“23eYvFFuL1FAxKxTyPVb”,“level”:3,“time”:“2020-08-20T08:15:03+00:00”,“remoteAddr”:“1.2.3.4”,“user”:“B77CC5B6-0E6E-4772-9595-C0734277D01D”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/remote.php/webdav/Daten",“message”:“Undefined index: debugMode at /var/www/html/core/templates/exception.php#26”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0”,“version”:“18.0.7.1”}

Sorry i only find this. Perhaps there is still the problem:

https://github.com/nextcloud/server/issues/20622#issuecomment-619412039

Can you upgrade to Nextcloud 19? Perhaps it is an option.

Hi! I already tried that one.
And this: https://github.com/nextcloud/server/commit/5c9c0207d89a9e92087a9694df2f75af179c3497

This is just some sort of demo setup. I am using UCS (univention corporate server) for convenience and their NC package is at 18.0.7 at the moment. So I cannot update to 19 at the moment.

On the other hand: There are posts in the thread of people that claim they got the same issue still with NC 19… .

I also have a similar issue NC 21
Which I have documented here in the community: