Created 03-22-2023 02:41 AM
Hi all,
I installed Hue on my CDP 7.1.8 cluster recently but not able to access the UI.
Here are the screencap when trying to access the UI:
1.
2.
I have tried a solution found in the Cloudera Community and checked the Bind Hue Server to Wildcard Address option. However, the problem doesn't solved.
Please help me out with this issue. Thanks in advanced.
Created 03-22-2023 07:44 PM
Here is more information, from the rungunicornserver.log
[22/Mar/2023 19:39:50 -0700] middleware INFO Processing exception: syntax error at or near "ON"
LINE 1: ...oups" ("user_id", "group_id") VALUES (1100713, 1) ON CONFLIC...
^
: Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/backend s/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.SyntaxError: syntax error at or near "ON"
LINE 1: ...oups" ("user_id", "group_id") VALUES (1100713, 1) ON CONFLIC...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/core/handl ers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/desktop/core/ext-py3/django-axes-5.13.0/axes/decorators .py", line 11, in inner
return func(request, *args, **kwargs)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/desktop/core/src/desktop/auth/views.py", line 110, in d t_login
is_first_login_ever = first_login_ever()
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/desktop/core/src/desktop/auth/views.py", line 91, in fi rst_login_ever
if hasattr(backend, 'is_first_login_ever') and backend.is_first_login_ever():
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/desktop/core/src/desktop/auth/backend.py", line 322, in is_first_login_ever
return User.objects.exclude(id=install_sample_user().id).count() == 0
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/apps/useradmin/src/useradmin/models.py", line 371, in i nstall_sample_user
user.groups.add(default_group)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ fields/related_descriptors.py", line 950, in add
self._add_items(
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ fields/related_descriptors.py", line 1130, in _add_items
self.through._default_manager.using(db).bulk_create([
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ query.py", line 514, in bulk_create
returned_columns = self._batched_insert(
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ query.py", line 1293, in _batched_insert
self._insert(item, fields=fields, using=self.db, ignore_conflicts=ignore_conflicts)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ query.py", line 1270, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/models/ sql/compiler.py", line 1416, in execute_sql
cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/backend s/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/backend s/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/backend s/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/utils.p y", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/lib/hue/build/env/lib/python3.8/site-packages/django/db/backend s/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: syntax error at or near "ON"
LINE 1: ...oups" ("user_id", "group_id") VALUES (1100713, 1) ON CONFLIC...
Created 03-22-2023 08:24 PM
Here is more information from rungunicornserver.log
Please help me out. Thanks a lot.
Created 03-23-2023 11:02 AM
HUE uses a back end database and it would be interesting if you shared the creation steps
The DB configuration is in the hue.ini check the [database] section for the path to the DB (or look at /dump_config/, desktop, database).
If MySQL/MariaDB please check the config in /etc/my.cnf
[mysqld]
...
bind-address=0.0.0.0
default-storage-engine=innodb
sql_mode=STRICT_ALL_TABLES
Verify the DB connectivity
The HUE database file seems gone or not readable
Created 03-23-2023 08:20 PM
@Shelton Thank you for your support.
I am using PostgreSQL as the back end database. Here is my database server configuration file.
Anyone from anywhere should able to connect to the database. And I confirm that the database user can access hue database as below.
After I turn on the debug mode for Hue, I get the following error message
The error is about failure in inserting records to the hue database table. Therefore I tried manually insert the record and I can successfully do the insert.
After refresh the tab in browser, no error pops out but I still can't access to the page.
Here is the rungunicornserver.log message
Include some configuration settings about database on Cloudera console
Besides, I have turned on Kerberos and the host that I tried to access the Hue UI is not under the Kerberos realm. But the host and my cluster are in the same network, they can ping each others.
Please let me know if I need to provide any additional information. Thank you very much.
Created 03-25-2023 10:54 PM
Did somebody come across similar issue?
Created 07-05-2024 02:45 AM
Hello, I stumbled upon the same issue, anyone had any solution for this?
Or Do you have the solution already @BrianChan ?
Created 09-06-2024 10:30 AM
@BrianChan What is the postgres version being used here. Postgres versions below 9.5 doesn't support ON statement. It is only supported from Postgres 9.5 onwards. Refer https://stackoverflow.com/questions/61774741/psycopg2-errors-syntaxerror-syntax-error-at-or-near-on/...
Also we only support Postgres 10.x or higher versions from CDP 7.1.8.x onwards.
Please check out the support matrix https://supportmatrix.cloudera.com/