• Bug
    • Resolution: Fixed
    • Critical
    • 3.0.4
    • 3.0.1
    • library
    • None
    • 1
    • SDK30: Connect,Txns


      When we do a cluster.query we check the cluster version via an http call to /pools, to decide whether or not to use the cluster or an open. bucket. This is because of CCBC-1204. But, the cloud doesn't give us a /pools - we end up seeing an exception like this:

      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/couchbase/", line 596, in query
         err_msg="Query requires an open bucket")
       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/couchbase/", line 611, in _maybe_operate_on_an_open_bucket
         if self._is_6_5_plus():
       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/couchbase/", line 547, in _is_6_5_plus
         response = self._admin.http_request(path="/pools").value
       File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/couchbase/management/", line 165, in http_request
      couchbase.exceptions.NetworkException: <Key='/pools', RC=0x418[LCB_ERR_NETWORK (1048)], HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/pycbc_http.c,212), OBJ=HttpResult<rc=0x418[LCB_ERR_NETWORK (1048)], value=None, http_status=0, url=/pools, tracing_context=0, tracing_output=None>, Context={'response_code': 0, 'path': '/pools', 'response_body': '', 'endpoint': '', 'type': 'HTTPErrorContext'}, Tracing Output={":nokey:0": null}>

      So - you cannot query, search, or analytics_query right now.

      Simplest workaround, try cluster first, if that fails try the bucket (if any are open). Ideally we'd have a way to determine that we were successful, and continue without trying the failed path first. However that is tricky since we don't know if we failed because the cluster was not complete (say, query service nodes are down), or because of the version. Maybe we can discern the difference? Lets see if we can. Otherwise, just do the cluster and fall-back to the bucket. When CCBC-1204 is fixed, we should eliminate this code. In fact there should be a ticket to do that as well.


        For Gerrit Dashboard: PYCBC-954
        # Subject Branch Project Status CR V



            Ellis.Breen Ellis Breen
            david.kelly David Kelly (Inactive)
            0 Vote for this issue
            2 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes