Created on 07-10-2017 12:15 AM - edited 09-16-2022 04:54 AM
Hi,
I have installed Cloudera Manager (Cloudera Express 5.11.1), CDH, and managed services, using Installation Path A on CentOS 7. But, I cannot properly open Hue Web UI, the web page returns this
This is the full text:
Traceback (most recent call last): File "/usr/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 1215, in communicate req.respond() File "/usr/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 576, in respond self._respond() File "/usr/lib/hue/desktop/core/src/desktop/lib/wsgiserver.py", line 588, in _respond response = self.wsgi_app(self.environ, self.start_response) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/wsgi.py", line 206, in __call__ response = self.get_response(request) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 194, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 236, in handle_uncaught_exception return callback(request, **param_dict) File "/usr/lib/hue/desktop/core/src/desktop/views.py", line 383, in serve_500_error return render("500.mako", request, {'traceback': traceback.extract_tb(exc_info[2])}) File "/usr/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 227, in render **kwargs) File "/usr/lib/hue/desktop/core/src/desktop/lib/django_util.py", line 148, in _render_to_response return django_mako.render_to_response(template, *args, **kwargs) File "/usr/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 125, in render_to_response return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs) File "/usr/lib/hue/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal result = template.render(**data_dict) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render return runtime._render(self, self.callable_, args, data) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render **_kwargs_for_callable(callable_, data)) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template callable_(context, *args, **kwargs) File "/tmp/tmp7PuCnK/desktop/500.mako.py", line 111, in render_body __M_writer(unicode( commonfooter(request, messages) )) File "/usr/lib/hue/desktop/core/src/desktop/views.py", line 498, in commonfooter hue_settings = Settings.get_settings() File "/usr/lib/hue/desktop/core/src/desktop/models.py", line 90, in get_settings settings, created = Settings.objects.get_or_create(id=1) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 154, in get_or_create return self.get_queryset().get_or_create(**kwargs) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 376, in get_or_create return self.get(**lookup), False File "/usr/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 "/usr/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 "/usr/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 "/usr/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 "/usr/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 "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 785, in execute_sql cursor = self.connection.cursor() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 162, in cursor cursor = util.CursorWrapper(self._cursor(), self) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 132, in _cursor self.ensure_connection() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/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 "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 115, in connect self.connection = self.get_new_connection(conn_params) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py", line 115, in get_new_connection return Database.connect(**conn_params) File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: password authentication failed for user "hue"
I tried to look Hue log file at /var/log/hue/error.log, maybe there is clue in it.
[08/Jul/2017 10:30:01 -0700] file_reporter ERROR failed to write metrics to file Traceback (most recent call last): File "/usr/lib/hue/desktop/core/src/desktop/lib/metrics/file_reporter.py", line 51, in report_now json.dump(self.registry.dump_metrics(), f) File "/usr/lib/hue/desktop/core/src/desktop/lib/metrics/registry.py", line 107, in dump_metrics metrics = self._registry.dump_metrics() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/pyformance-0.3.2-py2.7.egg/pyformance/registry.py", line 215, in dump_metrics metrics[key] = self.get_metrics(key) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/pyformance-0.3.2-py2.7.egg/pyformance/registry.py", line 199, in get_metrics metrics.update(getter(key)) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/pyformance-0.3.2-py2.7.egg/pyformance/registry.py", line 132, in _get_gauge_metrics return {"value": gauge.get_value()} File "/usr/lib/hue/build/env/lib/python2.7/site-packages/pyformance-0.3.2-py2.7.egg/pyformance/meters/gauge.py", line 36, in get_value return self.callback() File "/usr/lib/hue/desktop/core/src/desktop/metrics.py", line 110, in <lambda> callback=lambda: User.objects.count(), File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 136, in count return self.get_queryset().count() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 294, in count return self.query.get_count(using=self.db) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/query.py", line 390, in get_count number = obj.get_aggregation(using=using)[None] File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/query.py", line 356, in get_aggregation result = query.get_compiler(using).execute_sql(SINGLE) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 785, in execute_sql cursor = self.connection.cursor() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 162, in cursor cursor = util.CursorWrapper(self._cursor(), self) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 132, in _cursor self.ensure_connection() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/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 "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 115, in connect self.connection = self.get_new_connection(conn_params) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py", line 115, in get_new_connection return Database.connect(**conn_params) File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: password authentication failed for user "hue" [08/Jul/2017 10:30:01 -0700] fsmanager ERROR Can not get filesystem called "default" for default schema "hdfs" [08/Jul/2017 10:30:01 -0700] fsmanager ERROR Failed to get filesystem called "default" for "s3a" schema: Filesystem not configured for s3a [08/Jul/2017 10:30:01 -0700] fsmanager ERROR Failed to get filesystem called "default" for "s3a" schema: Filesystem not configured for s3a [08/Jul/2017 10:30:01 -0700] middleware INFO Processing exception: FATAL: password authentication failed for user "hue" : Traceback (most recent call last): File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 370, in inner with self: File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 237, in __enter__ if not connection.get_autocommit(): File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 331, in get_autocommit self.ensure_connection() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/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 "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection self.connect() File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 115, in connect self.connection = self.get_new_connection(conn_params) File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py", line 115, in get_new_connection return Database.connect(**conn_params) File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: password authentication failed for user "hue"
Previously, Hue service was shown Bad in Cloudera Manager because of this error "The Cloudera Manager Agent is not able to communicate with this role's web server".
According to this article, the workaround is to uncheck the Bind Hue Server to Wildcard Address setting. It works for me, Hue service turned to Green. But I still face the password authentication failed issue.
Thanks in advance.
Created 07-10-2017 04:28 AM
It turns out Hue database hasn't been created yet. I thought it was done by during the installation, since no extra information in the installation article (path A).
Solution:
1. Set hue database password in Hue configuration with your own password. Hue service --> Configuration --> search Hue Database Password.
2. Create hue datatabase. Hue service --> Action --> Create hue database.
Created 07-10-2017 04:28 AM
It turns out Hue database hasn't been created yet. I thought it was done by during the installation, since no extra information in the installation article (path A).
Solution:
1. Set hue database password in Hue configuration with your own password. Hue service --> Configuration --> search Hue Database Password.
2. Create hue datatabase. Hue service --> Action --> Create hue database.