Support Questions

Find answers, ask questions, and share your expertise

dbVisualizer to be used for querying hive but getting error while accessing Hive metastore tables

New Contributor

Hi Everyone,

 

Sub: dbVisualizer to be used for querying hive tables


I have setup Kerberos(MIT) Authentication.
I have downloaded hive jdbc jars (hive_jdbc_2.5.17.1047) from cloudera connectors.
I tired to connect Hive metastore tables though DbVisualizer using Kerberos Authentication mechanism but getting below errors in dbVisualizer.

 

I tried with different hive JDBC urls and still getting errors

 

1. jdbc:hive2://<Servername.domain.com>:10000;
2 jdbc:hive2://<Servername.domain.com>:10000/default;principal=hive/<Servername2.domain.com>@HADOOP.yyy.XXXX.COM
3. jdbc:hive2://<Servername.domain.com>:10000;AuthMech=1;KrbRealm=HADOOP.yyy.XXXX.COM;KrbHostFQDN=<Servername2.domain.com>;KrbServiceName=hive

 

 

Error:

Log:

1.

2017-07-24 11:24:25.462 INFO 154 [ExecutorRunner-pool-3-thread-2 - H.?] Exception while connecting Hive2
java.sql.SQLException: [Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: java.net.ConnectException: Connection timed out: connect.
at com.cloudera.hiveserver2.hivecommon.api.HiveServer2ClientFactory.createTransport(Unknown Source)
Caused by: com.cloudera.hiveserver2.support.exceptions.GeneralException: [Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication:
java.net.ConnectException: Connection timed out: connect.

 

2.

[Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: Peer indicated failure: Unsupported mechanism type PLAIN 

 

 

 

 

4 REPLIES 4

Champion

@NarasimhaSomu

 

Make sure you have the below highlighted principal (servername instead of servername2) in the kerberos and try again

 

jdbc:hive2://<Servername.domain.com>:10000/default;principal=hive/<Servername.domain.com>@HADOOP.yyy.XXXX.COM

Champion
1. is for unsecured access
2. is for the Hive JDBC driver and looks mostly correct (comment below)
3. is for the Cloudera Hive JDBC driver

JDBC connections will always be to the HS2 and not HMS. The hostname portion of the principal needs to be the FQDN of the HS2 server you are connecting to.

Try the URI below.

jdbc:hive2://<Servername.domain.com>:10000;AuthMech=1;KrbRealm=HADOOP.yyy.XXXX.COM;KrbHostFQDN=<Servername.domain.com>;KrbServiceName=hive

New Contributor

Hello,

 

I am using option2 and getting the same error. Does anyone have a solution to this issue?

 

Thanks in advance,

Sunil Gourishetty.

Contributor

Sunil,

 

[Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: Peer indicated failure: Unsupported mechanism type PLAIN 

Is HiveServer2 configured for SSL connections?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.