Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Superset error while trying to add HDP Hive database as datasource

Solved Go to solution
Highlighted

Superset error while trying to add HDP Hive database as datasource

New Contributor

We recently installed Superset on our kerberized HDP Cluster (2.6.3).

We had no problem adding a connection to Oracle database but we could not make it work with Hive.

Next I show the different connections strings we tested and the returned errors:

1) hive://SERVER-FQDN:10000/HIVEDB;principal=hive/SERVER-FQDN@REALM

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nPassword should be set if and only if in LDAP or CUSTOM mode; Remove password or use one of those modes"}

2) hive://SERVER-FQDN:10000/HIVEDB

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nBad status: 3 (b'Unsupported mechanism type PLAIN')"}

Any body knows what we are doing wrong?

Is needed to configure LDAP access to Superset? How?

And another issue that burns our heads, we never could set log level to DEBUG, it only shows info messages. We will be very grateful if someone helps us solve it, it seems that we are working blindly.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Superset error while trying to add HDP Hive database as datasource

New Contributor

I solved the issue in two steps:

1) Adjusting Superset configuration:

# Set authentication method id for LDAP
AUTH_TYPE=2
# Set user login to query LDAP server
AUTH_LDAP_BIND_USER='CN=user_ldap,OU=Hadoop,OU=Service Accounts,DC=domain,DC=com,DC=ar'
AUTH_LDAP_BIND_PASSWORD='12345678Abc'
# Set basic specifications to get information from LDAP server
AUTH_LDAP_SEARCH='DC=domain,DC=com,DC=ar'
AUTH_LDAP_SERVER='ldap://server.domain.com.ar'
AUTH_LDAP_UID_FIELD='sAMAccountName'
AUTH_LDAP_USE_TLS=False
AUTH_LDAP_USERNAME_FORMAT='%s'
# I had to comment on this option to make the login works only using the UID
###AUTH_LDAP_APPEND_DOMAIN='domain.com.ar'
# Enable automatic user registration, then you just have to manually change the assigned profile
AUTH_ROLE_PUBLIC='Public'
AUTH_USER_REGISTRATION=True
AUTH_USER_REGISTRATION_ROLE='Public'

2) Adjusting the SQLAlchemy URI to get access to my kerberized cluster:

hive://hive-server.domain.com.ar:10000/hive-database?auth=KERBEROS&kerberos_service_name=hive

*** I had to get kerberos ticket manually to make it work:
kinit -k -t /etc/security/keytabs/superset.headless.keytab superset-hadoop_desarrollo

3 REPLIES 3

Re: Superset error while trying to add HDP Hive database as datasource

New Contributor

I solved the issue in two steps:

1) Adjusting Superset configuration:

# Set authentication method id for LDAP
AUTH_TYPE=2
# Set user login to query LDAP server
AUTH_LDAP_BIND_USER='CN=user_ldap,OU=Hadoop,OU=Service Accounts,DC=domain,DC=com,DC=ar'
AUTH_LDAP_BIND_PASSWORD='12345678Abc'
# Set basic specifications to get information from LDAP server
AUTH_LDAP_SEARCH='DC=domain,DC=com,DC=ar'
AUTH_LDAP_SERVER='ldap://server.domain.com.ar'
AUTH_LDAP_UID_FIELD='sAMAccountName'
AUTH_LDAP_USE_TLS=False
AUTH_LDAP_USERNAME_FORMAT='%s'
# I had to comment on this option to make the login works only using the UID
###AUTH_LDAP_APPEND_DOMAIN='domain.com.ar'
# Enable automatic user registration, then you just have to manually change the assigned profile
AUTH_ROLE_PUBLIC='Public'
AUTH_USER_REGISTRATION=True
AUTH_USER_REGISTRATION_ROLE='Public'

2) Adjusting the SQLAlchemy URI to get access to my kerberized cluster:

hive://hive-server.domain.com.ar:10000/hive-database?auth=KERBEROS&kerberos_service_name=hive

*** I had to get kerberos ticket manually to make it work:
kinit -k -t /etc/security/keytabs/superset.headless.keytab superset-hadoop_desarrollo

Re: Superset error while trying to add HDP Hive database as datasource

New Contributor

I got the same error ,done with Same Configuration after adding LDAP properties im unable to login.

Re: Superset error while trying to add HDP Hive database as datasource

New Contributor
@Geoffrey Shelton Okot

hi geoffrey,

can you look this error ,iam struggling with error ,if we remove ldap properties its working ,but im unable to connect to the hive.

97572-hive-error-superset.png

Please help me on this issue

Thanks in advance.

capture-superset.png