Setup DbVisualizer or Dbeaver or Data grip or other tools to access Secure Kerberos hadoop Cluster from remote windows machine
If you are on Windows 10 you should already be having utilities like - kinit, kutil, etc available on your machine.
If not then install MIT Kerberos - http://web.mit.edu/kerberos/
Here are the steps -
- Copy /etc/krb5.conf from any node of your cluster to your local machine
- Also, copy *.keytab file from cluster to your local machine.
- Rename krb5.conf as krb5.ini
- Copy krb5.ini to -
- <Java_home>\jre\lib\security\
- C:\Users\<User_name>\
- Copy keytab file to -
- C:\Users\<User_name>\
On Hadoop Cluster get the principal name from keytab file -
- ktutil
- ktutil: read_kt keytab
- ktutil: list
- slot KVNO Principal
- ---- ---- ---------------------------------------------------------------------
- 1 1 <username>@HADOOP.domain.COM
- ktutil: quit
Above highlighted is your principal name.
On windows -
- Execute: kinit -k -t C:\Users\<User_name>\*.keytab <username>@HADOOP.domain.COM
This will generate a ticket in user home. Something like - krb5cc_<username>
On windows -
- Set following environment variables -
- KRB5_CONFIG -> C:\Users\<User_name>\krb5.ini
- KRB5CCNAME -> C:\Users\<User_name>\krb5cc_<username>
----
Above steps will setup Kerberos for you.
Now, Install DBVisualizer -
- Download and install - https://www.dbvis.com/download/10.0
- Download hive-uber jar - https://github.com/timveil/hive-jdbc-uber-jar/releases
- Open DBVisualizer > Driver Manager - load the hive-jdbc-uber jar
- Create new connection provide -
- Database server name
- Database port . like 10000
- Database. Like - default;principal=hive/_HOST@HADOOP.domain.COM;
- If you want to specify YARN Queue then set database name like -
- default;principal=hive/_HOST@HADOOP.domain.COM;?tez.queue.name=myqueue
- Go to Tool properties and add following -
- -Dsun.security.krb5.debug=true
- -Djavax.security.auth.useSubjectCredsOnly=false
- -Djava.security.krb5.conf=C:\Users\<User_name>\krb5.ini
This completes installation & setup of DBVisualizer
Comments
Post a Comment