<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: S3 integration in Hue error : ValueError: Invalid S3 URI: S3A in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/91947#M18774</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added the parameter in the security valve, it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 10:00:02 GMT</pubDate>
    <dc:creator>jmarcopoulos</dc:creator>
    <dc:date>2019-06-25T10:00:02Z</dc:date>
    <item>
      <title>S3 integration in Hue error : ValueError: Invalid S3 URI: S3A</title>
      <link>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/90406#M18771</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've set a cluster with CDH 6.20, 1 master 4 slaves, with the parcels way. Everything is working quite good, except the connection between Hue and S3.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've followed the instructions from &lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/admin_s3_config.html" target="_blank" rel="noopener"&gt;this guide&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The hosts are running on Ubuntu 18.04, Python version is 2.7.15rc1S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to navigate my buckets in Hue filebrowser, I get this error in the GUI : "Unknown error occurred".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hue_err01.jpg" style="width: 240px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/5622i234F83C80C080899/image-size/large?v=v2&amp;amp;px=999" role="button" title="hue_err01.jpg" alt="hue_err01.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hue_err02.jpg" style="width: 466px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/5623iFDC9AC89C83863A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="hue_err02.jpg" alt="hue_err02.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the Hue server logs, here is the complete error :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Internal Server Error: /filebrowser/view=S3A:/
Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-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-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-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-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/utils/decorators.py", line 185, in inner
return func(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/apps/filebrowser/src/filebrowser/views.py", line 201, in view
stats = request.fs.stats(path)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 119, in stats
return self._get_fs(path).stats(path)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/libs/aws/src/aws/s3/__init__.py", line 52, in wrapped
return fn(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 256, in stats
stats = self._stats(path)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 157, in _stats
key = self._get_key(path, validate=True)
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/libs/aws/src/aws/s3/s3fs.py", line 131, in _get_key
bucket_name, key_name = s3.parse_uri(path)[:2]
File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/libs/aws/src/aws/s3/__init__.py", line 68, in parse_uri
raise ValueError("Invalid S3 URI: %s" % uri)
ValueError: Invalid S3 URI: S3A:&lt;/PRE&gt;&lt;P&gt;S3A seems to be the root URI. Here is the ajax URL requested by Hue, giving this error : &lt;FONT color="#3366FF"&gt;http://*****.com:8889/filebrowser/view=S3A://?format=json&amp;amp;sortby=name&amp;amp;descending=false&amp;amp;pagesize=100&amp;amp;pagenum=1&amp;amp;_=1557827867345&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know the credentials setup is okay, for 2 reasons :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I'm able to list a bucket content with &lt;FONT color="#3366FF"&gt;hadoop fs -ls&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;I can browse my buckets on Hue through an other cluster running CDH 5.13, with the same API access. This very same URL, except the hostname, is working fine on my other cluster.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to disable / enable S3guard.&lt;/LI&gt;&lt;LI&gt;to disable / enable the S3 connect for this cluster, in Administration &amp;gt; External accounts&lt;/LI&gt;&lt;LI&gt;to force the S3 endpoint in the S3Connect configuration. In my case,&amp;nbsp;&lt;FONT color="#3366FF"&gt;s3.eu-west-1.amazonaws.com&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;to disable the firewall on the server running Hue&lt;/LI&gt;&lt;LI&gt;to change the node where Hue server is running&lt;/LI&gt;&lt;LI&gt;to play with the URL by setting differents paths, including a bucket, and a resource.&lt;/LI&gt;&lt;LI&gt;to add key id / secret in the safety valve, as explained &lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/hue_use_s3_enable.html#section_xbx_ld1_jx" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running out of ideas, I wasn't able to find anything on the forum, stackoverflow, Jira.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or suggestion would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit (1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As the error is suggesting, the problem seems to be coming from the S3 URI, where a slash is missing.&lt;/P&gt;&lt;P&gt;No matter URI I test, the double slash in S3A:// is transformed to a single slash (/). As a result, the resquested URI, the root node, is S3A:/. It doesn't match the variables S3_ROOT and S3A_ROOT, in the&amp;nbsp;&lt;A href="https://github.com/cloudera/hue/blob/cdh6.2.0-release/desktop/libs/aws/src/aws/s3/__init__.py" target="_blank" rel="noopener"&gt;__init__.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've noticed that the Django framework version is different between CDH 5.13 and 6.20. I don't know if it's related, I'm not a python developper, but I'll continue to investigate and hopefully find some workaround.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 11:37:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/90406#M18771</guid>
      <dc:creator>jmarcopoulos</dc:creator>
      <dc:date>2026-04-21T11:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: S3 integration in Hue error : ValueError: Invalid S3 URI: S3A</title>
      <link>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/90471#M18772</link>
      <description>&lt;P&gt;I've put a dirty workaround, which is to add a slash, in case the path is beginning with s3a:/, so at the end the path contains 2 slashes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can now use the filebrowser with S3.&lt;/P&gt;&lt;P&gt;File apps/filebrowser/src/filebrowser/views.py, Line 183 :&lt;/P&gt;&lt;PRE&gt;path = path.replace("s3a:/", "s3a://").replace("S3A:/", "S3A://")&lt;/PRE&gt;&lt;P&gt;I would prefer a cleaner solution, because the day Hue get updated, my workaround will probably disappear.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 15:13:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/90471#M18772</guid>
      <dc:creator>jmarcopoulos</dc:creator>
      <dc:date>2019-05-15T15:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: S3 integration in Hue error : ValueError: Invalid S3 URI: S3A</title>
      <link>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/91752#M18773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/34025"&gt;@jmarcopoulos&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have Cloudera Manager for your cluster? If yes, you can update following config.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turned out that for Debian or Ubuntu OSs, we need configure Hue's&amp;nbsp;&lt;SPAN&gt;Load Balancer Advanced Configuration Snippet (Safety Valve) for httpd.conf with&lt;/SPAN&gt;&amp;nbsp;"MergeSlashes OFF", "Save Change" and restart Hue to avoid this missing slash error for s3 file browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Update_httpd_conf.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/5722iB7188BCB598197C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Update_httpd_conf.png" alt="Update_httpd_conf.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can use hue's server port: 8888 instead of hue's load balancer port:8889 to work around this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue seems only happening for Debian and Ubuntu env. Centos/Redhat, Slesus are working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Weixia&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 04:26:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/91752#M18773</guid>
      <dc:creator>weixia</dc:creator>
      <dc:date>2019-06-19T04:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: S3 integration in Hue error : ValueError: Invalid S3 URI: S3A</title>
      <link>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/91947#M18774</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added the parameter in the security valve, it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 10:00:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/S3-integration-in-Hue-error-ValueError-Invalid-S3-URI-S3A/m-p/91947#M18774</guid>
      <dc:creator>jmarcopoulos</dc:creator>
      <dc:date>2019-06-25T10:00:02Z</dc:date>
    </item>
  </channel>
</rss>

