Reply
New Contributor
Posts: 2
Registered: ‎10-20-2017

Hue unable to communicate with web server

I have installed Cloudera Manager (5.13) and CDH in Debian 8.4 (jessie). I get an error in my hue service.

The Cloudera Manager Agent is not able to communicate with this role's web server.

 

and when I connect to my hue web interface I get this:

 

Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 1215, in communicate
req.respond()
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 576, in respond
self._respond()
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 47, in load_middleware
mw_instance = mw_class()
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/middleware/locale.py", line 24, in __init__
for url_pattern in get_resolver(None).url_patterns:
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/urls.py", line 200, in <module>
if app.urls:
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 170, in urls
return self._submodule("urls")
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 201, in _submodule
return _import_module_or_none(self.module.__name__ + "." + name)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 53, in _import_module_or_none
__import__(module)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/urls.py", line 29, in <module>
import notebook.monkey_patches
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/monkey_patches.py", line 44, in <module>
if ENABLE_DBPROXY_SERVER.get() and [interpreter for interpreter in get_ordered_interpreters() if interpreter['interface'] == 'jdbc']:
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/conf.py", line 58, in get_ordered_interpreters
_default_interpreters(user)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/conf.py", line 231, in _default_interpreters
cluster = Cluster(user)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/models.py", line 1863, in __init__
self.default_cluster = get_user_preferences(self.user, key=USER_PREFERENCE_CLUSTER)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/models.py", line 1919, in get_user_preferences
x = UserPreferences.objects.get(user=user, key=key)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 151, in get
return self.get_queryset().get(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 304, in get
num = len(clone)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 77, in __len__
self._fetch_all()
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
self._result_cache = list(self.iterator())
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
for rows in self.execute_sql(MULTI):
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalueTraceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 1215, in communicate
    req.respond()
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 576, in respond
    self._respond()
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 47, in load_middleware
    mw_instance = mw_class()
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/urlresolvers.py", line 365, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/urlresolvers.py", line 360, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/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.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/urls.py", line 200, in <module>
    if app.urls:
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 170, in urls
    return self._submodule("urls")
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 201, in _submodule
    return _import_module_or_none(self.module.__name__ + "." + name)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/appmanager.py", line 53, in _import_module_or_none
    __import__(module)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/urls.py", line 29, in <module>
    import notebook.monkey_patches
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/monkey_patches.py", line 44, in <module>
    if ENABLE_DBPROXY_SERVER.get() and [interpreter for interpreter in get_ordered_interpreters() if interpreter['interface'] == 'jdbc']:
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/conf.py", line 58, in get_ordered_interpreters
    _default_interpreters(user)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/libs/notebook/src/notebook/conf.py", line 231, in _default_interpreters
    cluster = Cluster(user)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/models.py", line 1863, in __init__
    self.default_cluster = get_user_preferences(self.user, key=USER_PREFERENCE_CLUSTER)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/desktop/core/src/desktop/models.py", line 1919, in get_user_preferences
    x = UserPreferences.objects.get(user=user, key=key)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 304, in get
    num = len(clone)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 77, in __len__
    self._fetch_all()
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
ProgrammingError: (1146, "Table 'hue.desktop_userpreferences' doesn't exist")

 

I also use an external MySQL database for hue. Can anyone point me to the right direction?

Thanks in advnace.

 

Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

Re: Hue unable to communicate with web server

This looks like Hue table desktop_userpreferences was missing. Can you please log into Hue's backend database and check how many tables you have?

From my instance, I have 84 tables, see below:

mysql> show tables;
+--------------------------------+
| Tables_in_hue |
+--------------------------------+
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| axes_accessattempt |
| axes_accesslog |
| beeswax_metainstall |
| beeswax_queryhistory |
| beeswax_savedquery |
| beeswax_session |
| defaultconfiguration_groups |
| desktop_defaultconfiguration |
| desktop_document |
| desktop_document2 |
| desktop_document2_dependencies |
| desktop_document2permission |
| desktop_document_tags |
| desktop_documentpermission |
| desktop_documenttag |
| desktop_settings |
| desktop_userpreferences |
| django_admin_log |
| django_content_type |
| django_openid_auth_association |
| django_openid_auth_nonce |
| django_openid_auth_useropenid |
| django_session |
| django_site |
| documentpermission2_groups |
| documentpermission2_users |
| documentpermission_groups |
| documentpermission_users |
| jobsub_checkforsetup |
| jobsub_jobdesign |
| jobsub_jobhistory |
| jobsub_oozieaction |
| jobsub_ooziedesign |
| jobsub_ooziejavaaction |
| jobsub_ooziemapreduceaction |
| jobsub_ooziestreamingaction |
| oozie_bundle |
| oozie_bundledcoordinator |
| oozie_coordinator |
| oozie_datainput |
| oozie_dataoutput |
| oozie_dataset |
| oozie_decision |
| oozie_decisionend |
| oozie_distcp |
| oozie_email |
| oozie_end |
| oozie_fork |
| oozie_fs |
| oozie_generic |
| oozie_history |
| oozie_hive |
| oozie_java |
| oozie_job |
| oozie_join |
| oozie_kill |
| oozie_link |
| oozie_mapreduce |
| oozie_node |
| oozie_pig |
| oozie_shell |
| oozie_sqoop |
| oozie_ssh |
| oozie_start |
| oozie_streaming |
| oozie_subworkflow |
| oozie_workflow |
| pig_document |
| pig_pigscript |
| search_collection |
| search_facet |
| search_result |
| search_sorting |
| south_migrationhistory |
| useradmin_grouppermission |
| useradmin_huepermission |
| useradmin_ldapgroup |
| useradmin_userprofile |
+--------------------------------+
84 rows in set (0.00 sec)

I believe you did not install Hue correctly for some reason.
Highlighted
New Contributor
Posts: 2
Registered: ‎10-20-2017

Re: Hue unable to communicate with web server

I deleted everything and do the installation from scratch. It worked this time but I am not sure how

Announcements