Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2608

Connection fails if first node in connection string array is unavailable.



    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 3.0.2
    • 3.0.4
    • library
    • None
    • 1


      Consider a cluster with 4 healthy nodes. Our application uses the following connection string to connect to CB at startup:


      And using the following code snippet to secure our connection:

      var config = new ClusterOptions()
       .WithCredentials(username, password)));
      var clusterTask = Couchbase.Cluster.ConnectAsync(connectionString, config);
      Cluster = clusterTask.Result;
      Here is what we are experiencing:

      1. When cluster is healthy, application starts with no issues.
      2. server005 is dropped (for rolling upgrade, wanting no downtime)
      3. Application continues to run without issues (indicating initial bootstrapping worked when all nodes were healthy at startup)
      4. Attempt to restart the application–application will not start. In this case, we are receiving Couchbase.AuthenticationFailureException
      5. server005 is added back into the cluster (without rebalance)
      6. Application is started, but hangs on "Bucket could not be selected" errors
      7. Rebalance node on server005 back into cluster
      8. Application begins working.

      Seems to be two issues here. #1 The SDK will not attempt connection to the next server in the connection string if the FIRST server listed is down. #2 If a server is online, but has not been rebalanced back into the cluster, errors on that one server hang the application instead of moving to the next server in the connection list.  


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


          No work has yet been logged on this issue.


            jmorris Jeff Morris
            atkinsr Ryan Atkins
            0 Vote for this issue
            2 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes