Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to access Impala app from HUE Web UI

avatar
Explorer

I have HUE 3.9.0 installed and running on MapR cluster. 

I am able to see the Impala app when i login as superuser but I am not able to see Impala app when I login to HUE as normal User.

 

I get this error in runcpserver.log

 

02/Feb/2017 19:37:22 -0800] resource     DEBUG    GET Got response: {"apps":null}

[02/Feb/2017 19:37:23 -0800] access       INFO     10.250.50.67 ajay - "GET /jobbrowser/ HTTP/1.1"

[02/Feb/2017 19:37:23 -0800] connectionpool DEBUG    "GET /ws/v1/cluster/apps?limit=10000&user=ajay&finalStatus=UNDEFINED HTTP/1.1" 200 None

[02/Feb/2017 19:37:23 -0800] resource     DEBUG    GET Got response: {"apps":null}

[02/Feb/2017 19:37:53 -0800] access       INFO     10.250.50.67 ajay - "GET /jobbrowser/ HTTP/1.1"

[02/Feb/2017 19:37:53 -0800] connectionpool DEBUG    "GET /ws/v1/cluster/apps?limit=10000&user=mapr&finalStatus=UNDEFINED HTTP/1.1" 200 None

[02/Feb/2017 19:37:53 -0800] resource     DEBUG    GET Got response: {"apps":null}

[02/Feb/2017 19:37:53 -0800] access       INFO     10.250.50.67 ajay - "GET /jobbrowser/ HTTP/1.1"

[02/Feb/2017 19:37:53 -0800] connectionpool DEBUG    "GET /ws/v1/cluster/apps?limit=10000&user=ajay&finalStatus=UNDEFINED HTTP/1.1" 200 None

[02/Feb/2017 19:37:53 -0800] resource     DEBUG    GET Got response: {"apps":null}

[02/Feb/2017 19:38:05 -0800] access       INFO     10.250.50.67 ajay - "GET /impala/ HTTP/1.1" -- permission denied

1 ACCEPTED SOLUTION

avatar
Champion
Ok, find this pythons script in your Hue install location. Below is the path for CDH.

/opt/cloudera/parcels/CDH/lib/hue/tools/app_reg/app_reg.py

This is the default for Hue.

/usr/share/hue/tools/app_reg/app_reg.py

Try to install the Impala app

/opt/cloudera/parcels/CDH/lib/hue/tools/app_reg/app_reg.py
--install /opt/cloudera/parcels/CDH/lib/hue/apps/impala

/usr/share/hue/tools/app_reg/app_reg.py --install /usr/share/hue/apps/impala

View solution in original post

12 REPLIES 12

avatar
Champion
Ok, find this pythons script in your Hue install location. Below is the path for CDH.

/opt/cloudera/parcels/CDH/lib/hue/tools/app_reg/app_reg.py

This is the default for Hue.

/usr/share/hue/tools/app_reg/app_reg.py

Try to install the Impala app

/opt/cloudera/parcels/CDH/lib/hue/tools/app_reg/app_reg.py
--install /opt/cloudera/parcels/CDH/lib/hue/apps/impala

/usr/share/hue/tools/app_reg/app_reg.py --install /usr/share/hue/apps/impala

avatar
Explorer

I had exact same problem.

 

So I issued this command:

opt/cloudera/parcels/CDH/lib/hue/tools/app_reg/app_reg.py --install /opt/cloudera/parcels/CDH/lib/hue/apps/impala

 

Now I when I go to localhost:8888, I get this:

Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 1215, in communicate
    req.respond()
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 576, in respond
    self._respond()
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 588, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/wsgi.py", line 187, in __call__
    self.load_middleware()
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 45, in load_middleware
    mw_class = import_by_path(middleware_path)
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/module_loading.py", line 26, in import_by_path
    sys.exc_info()[2])
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/module_loading.py", line 21, in import_by_path
    module = import_module(module_path)
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/middleware.py", line 45, in <module>
    import desktop.views
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/views.py", line 49, in <module>
    from desktop.converters import DocumentConverter
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/core/src/desktop/converters.py", line 27, in <module>
    from notebook.api import _historify
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/api.py", line 35, in <module>
    from notebook.views import upgrade_session_properties
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/views.py", line 38, in <module>
    from notebook.management.commands.notebook_setup import Command
  File "/opt/cloudera/parcels/CDH-5.11.1-1.cdh5.11.1.p0.4/lib/hue/desktop/libs/notebook/src/notebook/management/commands/notebook_setup.py", line 27, in <module>
    from useradmin.models import get_default_user_group, install_sample_user
ImproperlyConfigured: Error importing module desktop.middleware: "No module named useradmin.models"

 

avatar
Explorer

Hello Basically the 

desktop.middleware is missing.

To check it run below commands:

1. $ hue-3.9.0/build/env/bin/python

In the Python prompt type below commands

import sys

> 'desktop.middleware' in sys.modules (The output for this would be False)

>  import desktop.middleware

> desktop.middleware' in sys.modules (The output for this would be True if the lib exists)