Posts: 7
Registered: ‎06-23-2017

Failed to connect to Hive using Impyla with SSLTrustStore

[ Edited ]


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/", line 147, in connect
auth_mechanism=auth_mechanism, krb_host=krb_host)
File "/home/fayw/anaconda2/lib/python2.7/site-packages/impala/", line 779, in connect
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift_sasl/", line 68, in open
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/", line 289, in open
super(TSSLSocket, self).open()
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/", line 101, in open
handle = self._do_open(family, socktype)
File "/home/fayw/anaconda2/lib/python2.7/site-packages/thrift/transport/", line 286, in _do_open
raise TTransportException(TTransportException.NOT_OPEN, msg)
thrift.transport.TTransport.TTransportException: failed to initialize SSL



Cloudera Employee
Posts: 761
Registered: ‎03-23-2015

Re: Failed to connect to Hive using Impyla with SSLTrustStore


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?