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.

Cloudera HIVE ODBC connection failure to HS2

Cloudera HIVE ODBC connection failure to HS2

New Contributor

hello,

Currently we are using Cloudera CDH 5.3.1.

 

we started HS2 service with SSL enabled.

 

JDBC connection from beeline is successful, seen as below

hostname:/build/SSL> beeline
Beeline version 0.13.1-cdh5.3.1 by Apache Hive
beeline> !connect jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/build/SSL/my.truststore;trustStorePassword=P455w0rd
scan complete in 3ms
Connecting to jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/build/SSL/my.truststore;trustStorePassword=P455w0rd
Enter username for jdbc:hive2://hostname:10000/;ssl=true;sslTrustStore=/build/SSL/my.truststore;trustStorePassword=P455w0rd: hivetest
Enter password for jdbc:hive2://vantgvmlnx496:10000/;ssl=true;sslTrustStore=/build/SSL/my.truststore;trustStorePassword=P455w0rd: ********
Connected to: Apache Hive (version 0.13.1-cdh5.3.1)
Driver: Hive JDBC (version 0.13.1-cdh5.3.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://hostname:10000/>

 

but always failed through cloudera hive odbc driver [ ClouderaHiveODBC-2.5.21.1010-1.x86_64]

 

[hive_dsn]
Description=Cloudera ODBC Driver for Apache Hive
Driver=/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so
HOST=host-target
PORT=10000
Schema=default
ServiceDiscoveryMode=0
HiveServerType=2
AuthMech=3
ThriftTransport=1
UID=hivetest
PWD=P455w0rd
SSL=1
TrustedCerts=/build/SSL/my.truststore

 

using the following command to generate cert/jks files.

 

keytool -genkeypair -keystore hs2.keystore -keyalg RSA -alias hs2

keytool -exportcert -keystore hs2.keystore -alias hs2 -file hs2.cert -storepass P455w0rd

keytool -importcert -keystore my.truststore -alias hs2 -file hs2.cert

 

 

could anyone help me on this ? thanks

1 REPLY 1

Re: Cloudera HIVE ODBC connection failure to HS2

New Contributor
Under windows platform, the error shows as : [Cloudera][Hardy] (34) Error from server: SSL_CTX_load_verify_locations: error code: 0.