Support Questions

Find answers, ask questions, and share your expertise

Failed to connect to Hive using Impyla with SSLTrustStore

avatar
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

avatar
Super 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