Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.14.0, 0.15.0, 0.16.0
-
None
Description
Starting with 0.14.0 - probably this commit - when we call isOpen on an open TSSLSocket we get an error:
File "/home/michael/Impala/shell/build/py2_venv/local/lib/python2.7/site-packages/impala_shell/impala_client.py", line 226, in _close_transport if self.transport and self.transport.isOpen(): File "/home/michael/Impala/shell/build/py2_venv/local/lib/python2.7/site-packages/impala_shell/thrift/transport/TTransport.py", line 150, in isOpen return self.__trans.isOpen() File "/home/michael/Impala/shell/build/py2_venv/local/lib/python2.7/site-packages/thrift/transport/TSocket.py", line 92, in isOpen peeked_bytes = self.handle.recv(1, socket.MSG_PEEK) File "/usr/lib/python2.7/ssl.py", line 753, in recv self.__class__) ValueError: non-zero flags not allowed in calls to recv() on <class 'ssl.SSLSocket'>
A relatively simple reproduction (if you have an open socket to connect to) is
from thrift.transport import TSSLSocket import ssl sock = TSSLSocket.TSSLSocket('localhost', '21000', ssl.CERT_NONE, None, None, ssl_version=ssl.PROTOCOL_SSLv23) sock.open() sock.isOpen()
which produces
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/michael/Impala/shell/build/py3_venv/lib/python3.8/site-packages/thrift/transport/TSocket.py", line 92, in isOpen peeked_bytes = self.handle.recv(1, socket.MSG_PEEK) File "/usr/lib/python3.8/ssl.py", line 1223, in recv raise ValueError( ValueError: non-zero flags not allowed in calls to recv() on <class 'ssl.SSLSocket'>
I've reproduced this with python 2.7 and python 3.8.
Attachments
Issue Links
- causes
-
IMPALA-11343 impala-shell --ssl fails in PyPI install
- Resolved
- is depended upon by
-
IMPALA-11348 Update to Thrift 0.17.0 and revert THRIFT-5595 workaround
- Open
- links to