Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HUE 3.5.0 SDK Errors

HUE 3.5.0 SDK Errors

New Contributor

I'm using CDH-5.0.0-1.cdh5.0.0.p0.47, HUE works without problems at first. But when I try to create a new application using :

 

  • ../build/env/bin/hue create_desktop_app chef

 

  • ../build/env/bin/python ../tools/app_reg/app_reg.py --install chef

I restart HUE and get the following error messages on HUE's web interface :

 

Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 1198, in communicate
    req.respond()
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 568, in respond
    self._respond()
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 580, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/views.py", line 284, in serve_500_error
    return render("500.mako", request, {'traceback': traceback.extract_tb(exc_info[2])})
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 222, in render
    **kwargs)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 144, in _render_to_response
    return django_mako.render_to_response(template, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 117, in render_to_response
    return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 106, in render_to_string_normal
    result = template.render(**data_dict)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Mako-0.8.1-py2.6.egg/mako/template.py", line 443, in render
    return runtime._render(self, self.callable_, args, data)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Mako-0.8.1-py2.6.egg/mako/runtime.py", line 786, in _render
    **_kwargs_for_callable(callable_, data))
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Mako-0.8.1-py2.6.egg/mako/runtime.py", line 818, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Mako-0.8.1-py2.6.egg/mako/runtime.py", line 844, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmpNAkRRz/desktop/500.mako.py", line 37, in render_body
    __M_writer(unicode( commonheader(_('Error'), "", user) ))
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/desktop/core/src/desktop/views.py", line 345, in commonheader
    if user.is_authenticated():
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/functional.py", line 184, in inner
    self._setup()
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/functional.py", line 248, in _setup
    self._wrapped = self._setupfunc()
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/middleware.py", line 16, in <lambda>
    request.user = SimpleLazyObject(lambda: get_user(request))
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/middleware.py", line 8, in get_user
    request._cached_user = auth.get_user(request)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/__init__.py", line 100, in get_user
    backend = load_backend(backend_path)
  File "/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/__init__.py", line 16, in load_backend
    raise ImproperlyConfigured('Error importing authentication backend %s: "%s"' % (path, e))
ImproperlyConfigured: Error importing authentication backend desktop.auth.backend.AllowFirstUserDjangoBackend: "No module named useradmin.models"

Is there any modifications to HUE's apps. This method worked with older versions of HUE.

 

Best regards,

7 REPLIES 7

Re: HUE 3.5.0 SDK Errors

I just did it and it worked for me. Could you do it directly from the Hue
root dir? (e.g. ../build/env/bin/hue --> ./build/env/bin/hue)

cat ./build/env/lib/python2.7/site-packages/hue.pth
../../../../../apps/about/src
../../../../../apps/beeswax/src
../../../../../apps/collectionmanager/src
../../../../../apps/filebrowser/src
../../../../../apps/hbase/src
../../../../../apps/help/src
../../../../../apps/impala/src
../../../../../apps/jobbrowser/src
../../../../../apps/jobsub/src
../../../../../apps/metastore/src
../../../../../apps/oozie/src
../../../../../apps/pig/src
../../../../../apps/proxy/src
../../../../../apps/rdbms/src
../../../../../apps/search/src
../../../../../apps/spark/src
../../../../../apps/sqoop/src
../../../../../apps/useradmin/src
../../../../../apps/zookeeper/src

Romain

Re: HUE 3.5.0 SDK Errors

New Contributor
Thank you for the reply. I will test your proposed method, but for now
I'm stuck with a broken HUE.
Do you have any work around to fix this issue so that I can test again
with your proposed method ?
Another quick question, do i have to use python 2.7 ? Does it have
something to do with the fact that my system has python2.6 ? Knowing
that HUE works fine after installation and only breaks when i create a
new app.

Best regards,


Re: HUE 3.5.0 SDK Errors

What is the content of the equivalent of
./build/env/lib/python2.7/site-packages/hue.pth ?

Romain

Re: HUE 3.5.0 SDK Errors

New Contributor
Here's my hue.pth :

cat build/env/lib/python2.6/site-packages/hue.pth

../../../../../apps/apps/about/src
../../../../../apps/apps/beeswax/src
../../../../../apps/apps/filebrowser/src
../../../../../apps/apps/hbase/src
../../../../../apps/apps/help/src
../../../../../apps/apps/impala/src
../../../../../apps/apps/jobbrowser/src
../../../../../apps/apps/jobsub/src
../../../../../apps/apps/metastore/src
../../../../../apps/apps/oozie/src
../../../../../apps/apps/pig/src
../../../../../apps/apps/proxy/src
../../../../../apps/apps/rdbms/src
../../../../../apps/apps/search/src
../../../../../apps/apps/spark/src
../../../../../apps/apps/sqoop/src
../../../../../apps/apps/useradmin/src
../../../../../apps/apps/zookeeper/src
/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/MYAPP/src

Re: HUE 3.5.0 SDK Errors

Could you make sure the 'apps/apps' paths --> 'apps'?

Also probably
'/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/MYAPP/src'
-->
../../../../../apps/MYAPPS/src

Here is an example of clean hue.pth:
cd
/opt/cloudera/parcels/CDH/lib/hue

cat ./build/env/lib/python2.7/site-packages/hue.pth
../../../../../apps/about/src
../../../../../apps/beeswax/src
../../../../../apps/filebrowser/src
../../../../../apps/hbase/src
../../../../../apps/help/src
../../../../../apps/impala/src
../../../../../apps/jobbrowser/src
../../../../../apps/jobsub/src
../../../../../apps/metastore/src
../../../../../apps/oozie/src
../../../../../apps/pig/src
../../../../../apps/proxy/src
../../../../../apps/rdbms/src
../../../../../apps/search/src
../../../../../apps/spark/src
../../../../../apps/sqoop/src
../../../../../apps/useradmin/src

Romain

Re: HUE 3.5.0 SDK Errors

New Contributor
I'm using CDH5 with python2.6.

I think i found the problem. Adding a new app modifies the hue.pth file
and creates a bizarre apps/apps hierarchy :

So this is my hue.pth before adding the app :

../../../../../apps/about/src
../../../../../apps/beeswax/src
../../../../../apps/filebrowser/src
../../../../../apps/hbase/src
../../../../../apps/help/src
../../../../../apps/impala/src
../../../../../apps/jobbrowser/src
../../../../../apps/jobsub/src
../../../../../apps/metastore/src
../../../../../apps/oozie/src
../../../../../apps/pig/src
../../../../../apps/proxy/src
../../../../../apps/rdbms/src
../../../../../apps/search/src
../../../../../apps/spark/src
../../../../../apps/sqoop/src
../../../../../apps/useradmin/src
../../../../../apps/zookeeper/src

I add the app :

./build/env/bin/hue create_desktop_app MYAPP

I install it :

./build/env/bin/python ./tools/app_reg/app_reg.py --install MYAPP

I end up with this corrupted file :

../../../../../apps/apps/about/src
../../../../../apps/apps/beeswax/src
../../../../../apps/apps/filebrowser/src
../../../../../apps/apps/hbase/src
../../../../../apps/apps/help/src
../../../../../apps/apps/impala/src
../../../../../apps/apps/jobbrowser/src
../../../../../apps/apps/jobsub/src
../../../../../apps/apps/metastore/src
../../../../../apps/apps/oozie/src
../../../../../apps/apps/pig/src
../../../../../apps/apps/proxy/src
../../../../../apps/apps/rdbms/src
../../../../../apps/apps/search/src
../../../../../apps/apps/spark/src
../../../../../apps/apps/sqoop/src
../../../../../apps/apps/useradmin/src
../../../../../apps/apps/zookeeper/src
/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/hue/MYAPP/src

I have to change apps/apps to apps for it to work again.





Re: HUE 3.5.0 SDK Errors

And with --relative-paths option?

./build/env/bin/python ./tools/app_reg/app_reg.py --install MYAPP
--relative-paths

[--relative-paths]
To register and install new application(s).
Add '--relative-paths' to the end of the args list to force the app
manager to register the new application using its path relative to the hue
root.

(I am going to add a note in the doc)

Romain

Don't have an account?
Coming from Hortonworks? Activate your account here