Created on 08-27-2018 01:19 AM - edited 09-16-2022 06:38 AM
Greetings,
We have upgraded CM/CDH from 5.4.4 to 5.15. Everything passed OK.
It seems that the HUE WebUI is missing now (after upgrade) all the users information. Even the admin (supersuser) is missing, and asks to be re-created.
Is there a solution/workaround for that situation ?
regards,
Avi
Created 08-28-2018 01:41 AM
Not sure you are getting the user info from ldap/ad or database, or some other
1. CM -> Hue-> config -> Authentication Backend
a. if you are using ldap then it should be "desktop.auth.backend.LdapBackend"
b. if you are using database then it should be "desktop.auth.backend.AllowFirstUserDjangoBackend"
2. CM -> Administration (menu) -> Settings -> search for ldap
a. "Authentication Backend order" -> choose 'External then database'
b. make sure your ldap configuration is updated as needed
NOTE: Before you make any changes/overwrite your config, pls make sure to take a backup
Pls try this, it may help you
Created 08-28-2018 01:56 AM
Hello
Many thanks for the answer.
We don't use LDAP neither AD for users storage.
So we keep them in the default Hue database.
Indeed we have the "desktop.auth.backend.AllowFirstUserDjangoBackend" value set for Authentication Backend .
Any advices as per our configuration ?
regards
Created 08-28-2018 02:04 AM
What about this?
CM -> Administration (menu) -> Settings -> search for
a. "Authentication Backend order" -> choose 'External then database'
Created 08-28-2018 04:25 AM
When i search through CM -> Administration menu -> Settings
for LDAP - i get only two/following results:
- Kerberos Active Directory LDAPS Port
- Parcels Create Users and Groups, and Apply File Permissions for Parcels
As you see - no "Authentication Backend order" values here.
Created 08-28-2018 04:42 AM
The only way to see the settings of "Authentication Backend" - is :
goto Hue=>Configuration and search for "Authentication Backend".
There we have the following possibilities:
desktop.auth.backend.SpnegoDjangoBackend
django.contrib.auth.backends.ModelBackend
desktop.auth.backend.AllowFirstUserDjangoBackend
desktop.auth.backend.LdapBackend
desktop.auth.backend.AllowAllBackend
desktop.auth.backend.PamBackend
and the default value "desktop.auth.backend.AllowFirstUserDjangoBackend" is set.
Created 08-29-2018 04:16 PM
My guess is that your database was changed in Hue. In recent releases we no long user sqlite by default so if you were using sqlite before, I wonder if you see that Hue is configured for another database now.
In Cloudera Manager, go to your Hue configuration and look at the Database settings.
If you are not sure, you can check "History and Rollback" link on that page to see recent changes that may have been made (even by wizards, upgrade, etc.)
-Ben
Created 08-29-2018 04:18 PM
**** NOTE: backend configuration defines how auth is done, not what users are visible in the Hue UI. If Hue asked you to create an admin account again, that means it has a fresh database.
Created 08-30-2018 05:07 AM
We did use SQLite3 as Hue database in Cloudera 5.4.4.
Before the upgrade - we've made a backup of that database (as from /var/lib/hue/desktop.db).
After the upgrade - when tried to Login to Hue WebUI - have been asked to create a new user.
Reason - unknown. Indeed it could be that upgrade to 5.15 had some impact to the Hue database.
So, have stopped Hue and just replaced the Hue database file - with the backed up before 5.4.4 db file, and then started Hue.
This seems to work , and although there were some warnings, Hue seems to "know" the defined before users and permissions.
As for now - in Hue Configuration Database settings arrear SQLite3, and it seems to work.
The questions are:
1. What is the proper way to care about Hue database while upgrading from 5.4.4 to 5.15 ?
2. Shall we expect for some negative impat after processing the Hue database (restored from 5.4.4) as described above ?
Best regards and looking forward your assistance
Created 09-03-2018 08:39 PM
Created 09-04-2018 05:18 AM
We don't use LDAP.
Our Hue database is SQLite3.
Created 09-04-2018 08:14 AM
I wonder if something strange happened due to having a non-default desktop.db database file/location so this triggered an "upgrade" maneuver by which a database file located in /usr/share/hue/desktop will be backed up and then moved to the location in /var/lib/hue.
If such a thing happen, we should probably see the configuration change in the Hue Configuration "History and rollback".
Cause aside, if you have your Hue database back, then you should be fine now since a start of Hue in CDH triggers db sync and migration routines that will get your database updated for the CDH version you are on.
Note that you really need to migrate away from sqlite as it is single threaded and modern Hue will encounter problems if you are not on a database such as postgres, mysql, Oracle, etc.
https://www.cloudera.com/documentation/enterprise/6/6.0/topics/hue_dbs_migrate.html