I’ve spent a lot of time trying to make a connection with a kereberized impala server through python. It was possible with java jdbc. I don’t think this is a kereberos ticket problem. If I run klist I can see my ticket without problem.
Ticket cache: FILE:/tmp/krb5cc_4356
Default principal: [email protected]
Valid starting Expires Service principal
05/12/18 20:17:22 05/13/18 06:17:22 krbtgt/[email protected]
renew until 05/19/18 20:17:22
I use my own krb5.config file and like I said before I can use it with java, so I don’t see where is the problem here. My string connection:
conn = connect(host='impala/[email protected], port=21050, auth_mechanism='GSSAPI', user='xx', password='xx', database = 'xx', kerberos_service_name='impala')
I have always the same problem:
File conexionsimple.py", line 18, in <module> protocol=None)
File dbapi.py", line 147, in connect auth_mechanism=auth_mechanism)
File hiveserver2.py", line 758, in connect transport.open()
File python2.7/site-packages/thrift_sasl/__init__.py", line 68, in open self._trans.open()
File /thrift/transport/TSocket.py", line 101, in open message=message)
thrift.transport.TTransport.TTransportException: Could not connect to impala/[email protected]:21050
versions:
python 2.7.14
thrift 0.9.3
thrift-sasl 0.3
sasl 0.2
impyla 0.14
I tried with other thrift version (0.2.1) but I had the same error. Any suggestion?