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.

    XMLWordPrintable

Details

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

    Description

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

      "couchbase://server005.company.com,server006.company.com,server007.company.com,server008.company.com"

      And using the following code snippet to secure our connection:

      var config = new ClusterOptions()
       .WithConnectionString(connectionString)
       .WithBuckets(buckets)
       .WithCredentials(username, password)));
      var clusterTask = Couchbase.Cluster.ConnectAsync(connectionString, config);
      clusterTask.Wait();
      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.  

      Attachments

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

        Activity

          atkinsr Ryan Atkins created issue -
          jmorris Jeff Morris made changes -
          Field Original Value New Value
          Status New [ 10003 ] Open [ 1 ]
          jmorris Jeff Morris made changes -
          Fix Version/s 3.0.4 [ 17014 ]
          jmorris Jeff Morris made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jmorris Jeff Morris made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status In Progress [ 3 ] Resolved [ 5 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty