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.

Failed to connect to Hive using Impyla with SSLTrustStore

Failed to connect to Hive using Impyla with SSLTrustStore

Explorer

Hi,

I cannot connect to hive server using impyla and SSLTrustStore. Any help is highly appreciated!

 


>>> from impala.dbapi import connect
>>> conn = connect(host='localhost',port=9443,database='default',auth_mechanism='LDAP',use_ssl=True,ca_cert='/home/faywang/my.jks',user='uid',password='passw0rd')
No handlers could be found for logger "thrift.transport.TSSLSocket"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/fayw/anaconda2/lib/python2.7/site-packages/impala/dbapi.py", line 147, in connect
auth_mechanism=auth_mechanism, krb_host=krb_host)
File "/home/fayw/anaconda2/lib/python2.7/site-packages/impala/hiveserver2.py", line 779, in connect
transport.open()
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift_sasl/__init__.py", line 68, in open
self._trans.open()
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/TSSLSocket.py", line 289, in open
super(TSSLSocket, self).open()
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/TSocket.py", line 101, in open
handle = self._do_open(family, socktype)
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/TSSLSocket.py", line 286, in _do_open
raise TTransportException(TTransportException.NOT_OPEN, msg)
thrift.transport.TTransport.TTransportException: failed to initialize SSL

 

 

1 REPLY 1
Highlighted

Re: Failed to connect to Hive using Impyla with SSLTrustStore

Guru
Hi,

Couple of questions:

1. why you need to use impyla to connect to Hive? Impyla is designed for Impala, not Hive.
2. is port 9443 the correct port for Hive?
3. have you checked on the HiveServer2 log to see what is reported there?

Cheers
Eric
Don't have an account?
Coming from Hortonworks? Activate your account here