TOSIT-IO / tdp-collection-extras

Ansible roles to deploy the extra components of TDP
Apache License 2.0
5 stars 13 forks source link

Hue: Error loading psycopg2 module on Rocky8 #114

Closed kpgtek closed 1 year ago

kpgtek commented 1 year ago

I got the following error in TASK [tosit.tdp_extra.server : Initiate Hue database] running on Rocky8:

STDERR:

Traceback (most recent call last):
  File "/opt/tdp/hue/build/env/bin/hue", line 14, in <module>
    load_entry_point('desktop', 'console_scripts', 'hue')()
  File "/opt/tdp/hue-release-4.10.0-TDP-0.1.0/desktop/core/src/desktop/manage_entry.py", line 236, in entry
    raise e
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2
rpignolet commented 1 year ago

Do you use the Hue release build with python 3.6 ? You must use hue-release-4.10.0-TDP-0.1.0-python36.tar.gz when using Rocky 8 and hue-release-4.10.0-TDP-0.1.0.tar.gz when using Centos 7.

kpgtek commented 1 year ago

I confirm that the default Hue release build with Python 2.7 is used to install on Rocky8:

[root@edge-01 ~]# head -1 /opt/tdp/hue/build/env/bin/hue
#!/usr/bin/env python2.7

That is why I got this error. I did not pay attention that the release build with Python 3.6 is in the local binaries directory.

kpgtek commented 1 year ago

It seems that I could avoid this error by overriding tdp_varsfor hue in the tdp-getting-started:

hue_dist_file: "{% if (ansible_distribution_major_version | int) > 7 %}{{ hue_release }}-python36.tar.gz{% else %}{{ hue_release }}.tar.gz{% endif %}"