Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-948

Provide wheel with OpenSSL or document distribution with OpenSSL available

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • 3.0.1
    • None
    • None
    • 1
    • SDK26: TxnFunc2,TxnFormer,KS, SDK28: Txn Loop/Rb,PfQueryColl

    Description

      Tested just now, Python on WIndows (Python 3.8 installed from the Windows app store) does not work against Couchbase Cloud. It looks like this is because Windows Python either is not built with OpenSSL or does not expose the OpenSSL symbols to us.

      It exits with this:

      c:\Users\Matt Ingenthron>python testing.py
      Traceback (most recent call last):
        File "testing.py", line 7, in <module>
          cluster = Cluster.connect(
        File "C:\Users\Matt Ingenthron\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\couchbase\cluster.py", line 508, in connect
          return cls(connection_string, options, **kwargs)
        File "C:\Users\Matt Ingenthron\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\couchbase\cluster.py", line 491, in __init__
          super(Cluster, self).__init__(connection_string=str(self.connstr), _conntype=_LCB.LCB_TYPE_CLUSTER, **self._clusteropts)
        File "C:\Users\Matt Ingenthron\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\couchbase_core\client.py", line 141, in __init__
          super(Client, self).__init__(*args, **kwargs)
      couchbase.exceptions.CouchbaseException: <RC=0x405[LCB_ERR_SDK_FEATURE_UNAVAILABLE (1029)], Couldn't create instance. Either bad credentials/hosts/bucket names were passed, or there was an internal error in creating the object, C Source=(src/bucket.c,1116)>
      

      From this (anonymized) script:

      from couchbase.cluster import Cluster, ClusterOptions, ClusterTimeoutOptions
      from couchbase.search import TermQuery
      from couchbase.search import SearchOptions, HighlightStyle
      from couchbase.auth import PasswordAuthenticator, CertAuthenticator
      from datetime import timedelta
      # 10.143.193.101 = 6.0.3 cluster
      cluster = Cluster.connect(
      #    'couchbases://cb.51bbb323-476e-4354-bec8-5f9b0a67d146.dp.cloud.couchbase.com',
      #    'couchbases://cb.51bbb323-476e-4354-bec8-5f9b0a67d146.dp.cloud.couchbase.com?certpath=c:\\Users\\Matt\ Ingenthron\\Desktop\\cloudcert.pem',
          'couchbases://cb.51bbb323-476e-4354-bec8-5f9b0a67d146.dp.cloud.couchbase.com?ssl=no_verify',
          ClusterOptions(PasswordAuthenticator('youarent', 'allowedtoknow'))
      )
      d = cluster.bucket('travel-sample')
      

      You can see we played with a few samples, but the basic issue is as soon as you try to use TLS, even with just a simple "ssl=no_verify", it fails with LCB_ERR_SDK_FEATURE_UNAVAILABLE. At that stage, all lcb would have tried to do is set up some structures from OpenSSL.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Ellis.Breen Ellis Breen
              ingenthr Matt Ingenthron
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty