[ 
https://issues.apache.org/jira/browse/IMPALA-8908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058781#comment-17058781
 ] 

Tamas Mate commented on IMPALA-8908:
------------------------------------

Started working on this recently, checked the commits required to apply 
THRIFT-3634, it is available from thrift-0.10. I have found the following 
commits that should be be backported to the native-toolchain:
{code:java}
THRIFT-3634 Fix Python TSocket resource leak on connection failure
THRIFT-3618 Python TSSLSocket deprecation message should print caller…
THRIFT-3615 Fix Python SSL client resource leak on connection failure
THRIFT-3599 Validate client IP address against cert's SubjectAltName
THRIFT-2103 [python] Support for SSL certificates with Subject Altern… 
THRIFT-3596 Better conformance to PEP8 
THRIFT-1857 Python 3 Support
{code}
I was able to build a native-toolchain with these patches on, but the Impala 
build failed.

Today I stumbled upon IMPALA-9489, which looks like to be resolving this issue 
as well by using thrift-0.11 instead of thrift-0.9.3 when running impala-shell. 
[~dknupp] , could you confirm if my understanding is correct?

> Bad error message when failing to connect to HTTPS endpoint with shell
> ----------------------------------------------------------------------
>
>                 Key: IMPALA-8908
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8908
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 3.3.0
>            Reporter: Tim Armstrong
>            Assignee: Tamas Mate
>            Priority: Critical
>              Labels: observability, ramp-up
>
> Legitimate connection errors get masked with an UnboundLocalError. It looks 
> like THRIFT-3634 fixed this.
> {noformat}
> $ impala-shell.sh -i ip-10-97-80-186.cloudera.site --protocol=hs2 --ldap 
> --user csso_tarmstrong --ssl
> Starting Impala Shell using LDAP-based authentication
> SSL is enabled. Impala server certificates will NOT be verified (set 
> --ca_cert to change)
> LDAP password for csso_tarmstrong:
> Traceback (most recent call last):
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 
> 1880, in <module>
>     impala_shell_main()
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 
> 1841, in impala_shell_main
>     with ImpalaShell(options, query_options) as shell:
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 
> 243, in __init__
>     self.do_connect(options.impalad)
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 
> 812, in do_connect
>     self._connect()
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_shell.py", line 
> 860, in _connect
>     self.server_version, self.webserver_address = self.imp_client.connect()
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_client.py", 
> line 176, in connect
>     self.transport = self._get_transport(self.client_connect_timeout_ms)
>   File "/home/tarmstrong/Impala/incubator-impala/shell/impala_client.py", 
> line 472, in _get_transport
>     transport.open()
>   File "/home/tarmstrong/Impala/incubator-impala/shell/thrift_sasl.py", line 
> 61, in open
>     self._trans.open()
>   File 
> "/opt/Impala-Toolchain/thrift-0.9.3-p7/python/lib/python2.7/site-packages/thrift/transport/TSSLSocket.py",
>  line 258, in open
>     logger.error('Error while connecting with %s.', ip_port, exc_info=True)
> UnboundLocalError: local variable 'ip_port' referenced before assignment
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to