Symptoms
In the Workspace, an error message appears when trying to access a published drive: Unable to list files from folder".
In awingu-api.service.log , it would show this:
2023-09-05 16:35:36.919941+00:00 awingu1 awingu-api.service[/opt/awingu/awingu-core/virtualenv/bin/gunicorn:99715]: Received error output: auth_method=ntlm
jcifs.smb.SmbException: Failed to connect to server
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:429)
at jcifs.smb.SmbFile.ensureTreeConnected(SmbFile.java:559)
at jcifs.smb.SmbFile.exists(SmbFile.java:859)
at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1077)
at com.awingu.ClientHandler.run(CifsBackend.java:372)
Caused by: java.net.UnknownHostException: somehost.somedomain.org
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:1054)
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:55)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:173)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:48)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:565)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:489)
at jcifs.smb.SmbTreeConnection.connect(SmbTreeConnection.java:465)
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:426)
... 4 more
2023-09-05 16:35:36.920634+00:00 awingu1 awingu-api.service[awingu-drivebackends:99715]: [343971-2-1693931736.815] [ERROR] - Cannot get file or folder "/SOMEFOLDER/somefolder"
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/cifsbackend.py", line 168, in _get_attributes
return self._connection.get_attributes(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingufileproxy/awingu_cifs_backend.py", line 133, in get_attributes
return self._execute_action('get_attributes', path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingufileproxy/awingu_cifs_backend.py", line 114, in _execute_action
raise OSError(err)
OSError: jcifs.smb.SmbException: Failed to connect to server
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:429)
at jcifs.smb.SmbFile.ensureTreeConnected(SmbFile.java:559)
at jcifs.smb.SmbFile.exists(SmbFile.java:859)
at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1077)
at com.awingu.ClientHandler.run(CifsBackend.java:372)
Caused by: java.net.UnknownHostException: somehost.somedomain.org
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:1054)
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:55)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:173)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:48)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:565)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:489)
at jcifs.smb.SmbTreeConnection.connect(SmbTreeConnection.java:465)
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:426)
... 4 more
2023-09-05 16:35:36.946873+00:00 awingu1 awingu-api.service[/opt/awingu/awingu-core/virtualenv/bin/gunicorn:99715]: Internal Server Error: /api/v2/drives/13/dirents/
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/cifsbackend.py", line 168, in _get_attributes
return self._connection.get_attributes(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingufileproxy/awingu_cifs_backend.py", line 133, in get_attributes
return self._execute_action('get_attributes', path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingufileproxy/awingu_cifs_backend.py", line 114, in _execute_action
raise OSError(err)
OSError: jcifs.smb.SmbException: Failed to connect to server
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:429)
at jcifs.smb.SmbFile.ensureTreeConnected(SmbFile.java:559)
at jcifs.smb.SmbFile.exists(SmbFile.java:859)
at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1077)
at com.awingu.ClientHandler.run(CifsBackend.java:372)
Caused by: java.net.UnknownHostException: somehost.somedomain.org
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:1054)
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:55)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:173)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:48)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:565)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:489)
at jcifs.smb.SmbTreeConnection.connect(SmbTreeConnection.java:465)
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:426)
... 4 more
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/views.py", line 388, in dispatch
return super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/views.py", line 692, in dirents
data=self._get_dirent(
^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/views.py", line 492, in _get_dirent
dirent = backend.list(path, retry_not_found=retry_not_found)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/decorators.py", line 287, in list
result = self._backend.list(path, retry_not_found=retry_not_found)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/__init__.py", line 46, in log_function_call
return function(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/cifsbackend.py", line 227, in list
props_dict = self._get_attributes(path, retry_not_found)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/__init__.py", line 46, in log_function_call
return function(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/awingu/awingu-core/virtualenv/lib/python3.11/site-packages/awingucore/drives/backends/cifsbackend.py", line 173, in _get_attributes
raise DriveBackendError(
drives.backends.errors.DriveBackendError: Cannot get file or folder "/SOMEFOLDER/somefolder", error: jcifs.smb.SmbException: Failed to connect to server
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:429)
at jcifs.smb.SmbFile.ensureTreeConnected(SmbFile.java:559)
at jcifs.smb.SmbFile.exists(SmbFile.java:859)
at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1077)
at com.awingu.ClientHandler.run(CifsBackend.java:372)
Caused by: java.net.UnknownHostException: somehost.somedomain.org
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:1054)
at jcifs.netbios.NameServiceClientImpl.getAllByName(NameServiceClientImpl.java:55)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:173)
at jcifs.smb.SmbTransportPoolImpl.getSmbTransport(SmbTransportPoolImpl.java:48)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:565)
at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:489)
at jcifs.smb.SmbTreeConnection.connect(SmbTreeConnection.java:465)
at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:426)
... 4 more
Cause
There is an issue with the SMB URL.
Resolution
Make sure to specify a correct SMB URL. The error in the log file might be slightly misleading: validate not only the server name, but also the share name.
Was this article helpful?
Tell us how we can improve it.