Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.7.0
-
Fix Version/s: None
-
Component/s: app
-
Labels:None
Description
If S3 URL was trimmed double slash to single slash by Knox or any proxy server, then download S3 file failed with error:
[21/Oct/2020 15:12:29 -0700] middleware INFO Processing exception: Failed to access path "s3a:/huetestbucket/newbooks.csv": Invalid S3 URI: s3a:/huetestbucket/newbooks.csv: Traceback (most recent call last): File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/utils/decorators.py", line 185, in inner return func(*args, **kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/apps/filebrowser/src/filebrowser/views.py", line 150, in download if not request.fs.exists(path): File "/opt/cloudera/parcels/CDH/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 166, in exists return self._get_fs(path).exists(path) File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/__init__.py", line 54, in wrapped return fn(*args, **kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 283, in exists return self._stats(path) is not None File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 198, in _stats raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, str(e))) S3FileSystemException: Failed to access path "s3a:/huetestbucket/newbooks.csv": Invalid S3 URI: s3a:/huetestbucket/newbooks.csv [21/Oct/2020 15:12:29 -0700] exception ERROR Internal Server Error: /filebrowser/download=s3a:/huetestbucket/newbooks.csv Traceback (most recent call last): File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.29-py2.7.egg/django/utils/decorators.py", line 185, in inner return func(*args, **kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/apps/filebrowser/src/filebrowser/views.py", line 150, in download if not request.fs.exists(path): File "/opt/cloudera/parcels/CDH/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 166, in exists return self._get_fs(path).exists(path) File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/__init__.py", line 54, in wrapped return fn(*args, **kwargs) File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 283, in exists return self._stats(path) is not None File "/opt/cloudera/parcels/CDH/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 198, in _stats raise S3FileSystemException(_('Failed to access path "%s": %s') % (path, str(e))) S3FileSystemException: Failed to access path "s3a:/huetestbucket/newbooks.csv": Invalid S3 URI: s3a:/huetestbucket/newbooks.csv