hive LDAP with SSL not working
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 545
- PR merge metrics
- No merged PRs in 30d
Description
hi Guys,
I have two environment, Dev and PROD. In Dev we don't have SSL enabled for LDAP and so I am able to connect and run query.
However in PROD we have LDAP with SSL and whenever I tried to connect it gives me error.
**packages**
```
sasl==0.2.1
thrift==0.11.0
thrift-sasl==0.3.0
PyHive==0.6.1
```
**Code:**
```
hive.connect(host='Host',
port=10000,
database='default',
username='gaurang.shah',
password="MyPassword",
auth='LDAP')
```
Following is part of the configuration.
```
hive.server2.transport.mode
binary
hive.server2.use.SSL
true
```
Following is the **stacktrace**:
```
Traceback (most recent call last):
File "/Users/gaurang.shah/Documents/ctc/code/emsr/libs/hive.py", line 63, in
Hive().connect()
File "/Users/gaurang.shah/Documents/ctc/code/emsr/libs/hive.py", line 45, in connect
auth='LDAP'
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/pyhive/hive.py", line 94, in connect
return Connection(*args, **kwargs)
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/pyhive/hive.py", line 192, in __init__
self._transport.open()
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/thrift_sasl/__init__.py", line 87, in open
status, payload = self._recv_sasl_message()
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/thrift_sasl/__init__.py", line 108, in _recv_sasl_message
payload = self._trans.readAll(length)
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/thrift/transport/TTransport.py", line 60, in readAll
chunk = self.read(sz - have)
File "/Users/gaurang.shah/Documents/personal/code/migration/.venv/lib/python2.7/site-packages/thrift/transport/TSocket.py", line 132, in read
message='TSocket read 0 bytes')
thrift.transport.TTransport.TTransportException: TSocket read 0 bytes
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.