Answer
New Contributor
Posts: 5
Registered: ‎01-29-2018
Installation fails with Hue against PostgreSQL
[ Edited ]

This happened for me during the setup step on CentOS 7.5

 

 

The database connection check for Hue fails:

 

[16/May/2018 09:03:57 +0000] settings     DEBUG    DESKTOP_DB_TEST_USER SET: hue_test
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-6.0.0-1.cdh6.0.0.p0.339140/lib/hue/build/env/bin/hue", line 12, in <module>
    load_entry_point('desktop==4.1.0', 'console_scripts', 'hue')()
  File "/opt/cloudera/parcels/CDH-6.0.0-1.cdh6.0.0.p0.339140/lib/hue/desktop/core/src/desktop/manage_entry.py", line 149, in entry
    raise e
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2

python-psycopg2 is installed

 

This "fixes" it:

sudo ln -s /usr/lib64/python2.7/site-packages/psycopg2 /opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages

Related discussion: 

http://community.cloudera.com/t5/Web-UI-Hue-Beeswax/Hue-wont-start-No-module-named-psycopg2/td-p/470...

 

Other Answers: 1
Cloudera Employee
Posts: 3
Registered: ‎04-10-2017
Answered

Try installing latest psycopg2 python-postgres connector.

 

You may need to install "python-devel", "postgresql-devel" and then "pip install psycopg2==2.6.2" or higher