Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8864

Shell tests in http mode fail on CentOS 6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 3.3.0
    • Clients
    • ghx-label-1

    Description

      Error MessageAssertionError: Cmd ['--ssl', '-q', 'select 1 + 2'] was expected to succeed: Starting Impala Shell without Kerberos authentication SSL is enabled. Impala server certificates will NOT be verified (set --ca_cert to change) Warning: --connect_timeout_ms is currently ignored with HTTP transport. Error connecting: AttributeError, 'module' object has no attribute 'create_default_context' Not connected to Impala, could not execute queries.Stacktracecustom_cluster/test_client_ssl.py:90: in test_ssl
          self._validate_positive_cases(vector, "%s/server-cert.pem" % self.CERT_DIR)
      custom_cluster/test_client_ssl.py:235: in _validate_positive_cases
          result = run_impala_shell_cmd(vector, shell_options, wait_until_connected=False)
      shell/util.py:113: in run_impala_shell_cmd
          result.stderr)
      E   AssertionError: Cmd ['--ssl', '-q', 'select 1 + 2'] was expected to succeed: Starting Impala Shell without Kerberos authentication
      E   SSL is enabled. Impala server certificates will NOT be verified (set --ca_cert to change)
      E   Warning: --connect_timeout_ms is currently ignored with HTTP transport.
      E   Error connecting: AttributeError, 'module' object has no attribute 'create_default_context'
      E   Not connected to Impala, could not execute queries.
      

      ssl library in python does not have the required methods that the THttpClient relies on.

      [centos6 ~]# python
      Python 2.6.6 (r266:84292, Jul 10 2013, 22:48:45) 
      [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> 
      >>> import ssl;
      >>> ctx = ssl.create_default_context(Purpose.CLIENT_AUTH)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      AttributeError: 'module' object has no attribute 'create_default_context'
      

      While the page [1] says "It was added in 2.7.9 and newer.". It appears that it was backported to a few older versions shipped by linux vendors (although I was not able to narrow down the exact change log).

      [centos 7.3 ~]# python
      Python 2.7.5 (default, Jun 20 2019, 20:27:34) 
      [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import ssl;
      >>> ctx = ssl.create_default_context();
      >>> 
      

      [1] https://docs.python.org/2/library/ssl.html#ssl.create_default_context

      Attachments

        Issue Links

          Activity

            People

              bharathv Bharath Vissapragada
              bharathv Bharath Vissapragada
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: