Hbase tables not loading in Hue

Hi guys,

I have built Hue 4.10 in a Docker container on Hadoop version HDP-3.1.5, however, we are currently having problems loading our static resources such as javascript and css files when we try loading the browser. It seems to be coming from an error with Gunicorn as shown in the logs below:

[2021-11-22 10:00:42 +1100] [31] [ERROR] Socket error processing request.
Traceback (most recent call last):
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 66, in handle
    six.reraise(*sys.exc_info())
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/six.py", line 625, in reraise
    raise value
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 56, in handle
    self.handle_request(listener_name, req, client, addr)
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 129, in handle_request
    six.reraise(*sys.exc_info())
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/six.py", line 625, in reraise
    raise value
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 112, in handle_request
    resp.write_file(respiter)
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/http/wsgi.py", line 403, in write_file
    if not self.sendfile(respiter):
  File "/usr/share/hue/build/env/lib/python3.8/site-packages/gunicorn/http/wsgi.py", line 393, in sendfile
    sent += sendfile(sockno, fileno, offset + sent, count)
BlockingIOError: [Errno 11] Resource temporarily unavailable

This occurs with the default settings in the Hue.ini. We have tried setting the Gunicorn work class field to: gunicorn_work_class=sync which seems to solve this issue, however, we end up running into another issue with Hbase Thrift where it starts having syntax errors when loading tables:

[19/Nov/2021 15:44:40 +1100] thrift_util ERROR Thrift saw exception (this may be expected).
Traceback (most recent call last):
File "/usr/share/hue/desktop/core/src/desktop/lib/thrift_util.py", line 522, in wrapper
ret = res(*args, **kwargs)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 57, in decorate
return func(*args, **kwargs)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 2343, in scannerGetList
return self.recv_scannerGetList()
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 2363, in recv_scannerGetList
result.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 10790, in read
_elem493.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/ttypes.py", line 765, in read
_val13.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/ttypes.py", line 55, in read
self.value = iprot.readString()
File "/usr/share/hue/build/env/lib/python3.8/site-packages/thrift/protocol/TProtocol.py", line 184, in readString
return binary_to_str(self.readBinary())
File "/usr/share/hue/build/env/lib/python3.8/site-packages/thrift/compat.py", line 37, in binary_to_str
return bin_val.decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte
[19/Nov/2021 15:44:40 +1100] thrift_util INFO Thrift saw exception: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte
[19/Nov/2021 15:44:40 +1100] middleware INFO Processing exception: 'UnicodeDecodeError' object has no attribute 'message': Traceback (most recent call last):
File "/usr/share/hue/apps/hbase/src/hbase/api.py", line 52, in query
return getattr(self, action)(*args)
File "/usr/share/hue/apps/hbase/src/hbase/api.py", line 241, in getRowQuerySet
aggregate_data += client.scannerGetList(scanner, query['scan_length'], doas=self.user.username)
File "/usr/share/hue/desktop/core/src/desktop/lib/thrift_util.py", line 453, in wrapper
return attr(*args, **kwargs)
File "/usr/share/hue/desktop/core/src/desktop/lib/thrift_util.py", line 522, in wrapper
ret = res(*args, **kwargs)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 57, in decorate
return func(*args, **kwargs)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 2343, in scannerGetList
return self.recv_scannerGetList()
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 2363, in recv_scannerGetList
result.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/Hbase.py", line 10790, in read
_elem493.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/ttypes.py", line 765, in read
_val13.read(iprot)
File "/usr/share/hue/apps/hbase/gen-py/hbased/ttypes.py", line 55, in read
self.value = iprot.readString()
File "/usr/share/hue/build/env/lib/python3.8/site-packages/thrift/protocol/TProtocol.py", line 184, in readString
return binary_to_str(self.readBinary())
File "/usr/share/hue/build/env/lib/python3.8/site-packages/thrift/compat.py", line 37, in binary_to_str
return bin_val.decode('utf8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 72: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/share/hue/build/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/usr/share/hue/apps/hbase/src/hbase/views.py", line 86, in api_router
return api_dump(HbaseApi(request.user).query(*url_params))
File "/usr/share/hue/apps/hbase/src/hbase/api.py", line 56, in query
if 'Could not connect to' in e.message:
AttributeError: 'UnicodeDecodeError' object has no attribute 'message'

We are currently at a loss on how to solve these issues as it seem like when we fix one issue, another crops up.

Extra info: We are not using the Cloudera Manager platform to load up Hue but rather running Hue through a Docker container from https://github.com/gethue/hue. The Docker image was built instead of pulled as our cluster uses Kerberos and we had to add krb5-config and krb5-user libraries to the Dockerfile.

Just wondering if anyone else if having these problems and if there are ways to fix it?