Cannot connect SMB External Storage

Hi guys,

I have set up a new instance of NC running 20.0.1, I have set pretty much everything up identical to my old build but am having an issue when trying to add a CIFS/SMB external storage.

I have mirrored the setting from my old build which has no issues connecting but for some reason cannot get the external storage to mount, I can mount in the FS from a command line so it is likely something silly I am doing. SMBclient is installed and everything else is looking great, jsut this last hurdle to overcome :slight_smile:

NC Version - 20.0.1
Ubuntu Server - 20.04.1
PHP Version - 7.4.3

Extract from Logging: (Sorry if its spammy)

Warning no app in context Icewind\SMB\Exception\Exception: Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for /

  1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php - line 35:Icewind\SMB\Exception\Exception::unknown()

  2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php - line 88:Icewind\SMB\Exception\Exception::fromMap()

  3. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 441:Icewind\SMB\Wrapped\Parser->checkForError()

  4. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 189:Icewind\SMB\Wrapped\Share->parseOutput()

  5. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 188:Icewind\SMB\Wrapped\Share->stat()

  6. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  7. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  8. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  9. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  10. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  11. /var/www/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 113:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\GlobalStoragesController->create()

  13. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  14. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  15. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  16. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  17. /var/www/nextcloud/index.php - line 37:OC::handleRequest() 2020-11-17T12:37:48+0000
    Warning no app in context External storage not available: Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for / 2020-11-17T12:37:48+0000
    Warning no app in context OCP\Files\StorageAuthException: Storage unauthorized. Connection not valid

  18. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 192:OCA\Files_External\Lib\Storage\SMB->throwUnavailable()

  19. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  20. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  21. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  22. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  23. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  24. /var/www/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 180:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  25. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\GlobalStoragesController->update("*** sensiti … *")

  26. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  27. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  28. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  29. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  30. /var/www/nextcloud/index.php - line 37:OC::handleRequest()

Caused by Icewind\SMB\Exception\ConnectionException: Connection not valid

  1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 420:Icewind\SMB\Wrapped\Connection->read()

  2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 181:Icewind\SMB\Wrapped\Share->execute()

  3. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 188:Icewind\SMB\Wrapped\Share->stat()

  4. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  5. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  6. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  7. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  8. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  9. /var/www/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 180:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\GlobalStoragesController->update("*** sensiti … *")

  11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  12. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  13. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  14. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  15. /var/www/nextcloud/index.php - line 37:OC::handleRequest() 2020-11-17T12:21:24+0000
    Warning no app in context External storage not available: Storage unauthorized. Connection not valid 2020-11-17T12:21:24+0000
    Error no app in context Icewind\SMB\Exception\ConnectionException: Connection not valid

  16. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 420:Icewind\SMB\Wrapped\Connection->read()

  17. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 181:Icewind\SMB\Wrapped\Share->execute()

  18. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 188:Icewind\SMB\Wrapped\Share->stat()

  19. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  20. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  21. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  22. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  23. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  24. /var/www/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 180:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  25. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\GlobalStoragesController->update("*** sensiti … *")

  26. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  27. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  28. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  29. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  30. /var/www/nextcloud/index.php - line 37:OC::handleRequest() 2020-11-17T12:21:24+0000
    Error PHP Error: fwrite(): write of 12 bytes failed with errno=32 Broken pipe at /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php#103

  31. <>OC\Log\ErrorHandler::onError()

  32. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php - line 103:fwrite()

  33. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Connection.php - line 34:Icewind\SMB\Wrapped\RawConnection->write()

  34. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 419:Icewind\SMB\Wrapped\Connection->write()

  35. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 181:Icewind\SMB\Wrapped\Share->execute()

  36. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 188:Icewind\SMB\Wrapped\Share->stat()

  37. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  38. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  39. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  40. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  41. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  42. /var/www/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 180:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  43. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\GlobalStoragesController->update("*** sensiti … *")

  44. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  45. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  46. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  47. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  48. /var/www/nextcloud/index.php - line 37:OC::handleRequest() 2020-11-17T12:21:24+0000
    Error PHP Error: fwrite(): write of 1 bytes failed with errno=32 Broken pipe at /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/RawConnection.php#103 2020-11-17T12:21:24+0000
    Warning no app in context OCP\Files\StorageAuthException: Storage unauthorized. Connection not valid

  49. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 192:OCA\Files_External\Lib\Storage\SMB->throwUnavailable()

  50. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()

  51. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()

  52. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()

  53. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()

  54. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")

  55. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 330:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")

  56. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\StoragesController->show()

  57. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()

  58. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()

  59. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()

  60. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()

  61. /var/www/nextcloud/index.php - line 37:OC::handleRequest()

Caused by Icewind\SMB\Exception\ConnectionException: Connection not valid

  1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 420:Icewind\SMB\Wrapped\Connection->read()
  2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 181:Icewind\SMB\Wrapped\Share->execute()
  3. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 188:Icewind\SMB\Wrapped\Share->stat()
  4. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 336:OCA\Files_External\Lib\Storage\SMB->getFileInfo()
  5. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 458:OCA\Files_External\Lib\Storage\SMB->stat()
  6. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 703:OC\Files\Storage\Common->test()
  7. /var/www/nextcloud/apps/files_external/lib/MountConfig.php - line 264:OCA\Files_External\Lib\Storage\SMB->test()
  8. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 258:OCA\Files_External\MountConfig::getBackendStatus("*** sensiti … *")
  9. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 330:OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti … *")
  10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:OCA\Files_External\Controller\StoragesController->show()
  11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:OC\AppFramework\Http\Dispatcher->executeController()
  12. /var/www/nextcloud/lib/private/AppFramework/App.php - line 152:OC\AppFramework\Http\Dispatcher->dispatch()
  13. /var/www/nextcloud/lib/private/Route/Router.php - line 308:OC\AppFramework\App::main()
  14. /var/www/nextcloud/lib/base.php - line 1009:OC\Route\Router->match()
  15. /var/www/nextcloud/index.php - line 37:OC::handleRequest()

Any advice would be much appreciated :slight_smile:
Cheers
Rob

Disregard:

reinstalled libsmbclient-php and reactivated the extension and all is good :slight_smile:

How you have done it…
Can you send procedure