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

Bucket WaitUntilReadyAsync running into NullReferenceException

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.5
    • 3.0.7
    • None
    • None
    • 1

    Description

      While working on the FIT performer and wanting to make sure the connection bootstrapped before performing the tx workload I did:

                  conn.Cluster = await Couchbase.Cluster.ConnectAsync(request.ClusterHostname, request.ClusterUsername,
                          request.ClusterPassword).ConfigureAwait(false);
                  conn.Bucket = await conn.Cluster.BucketAsync(request.BucketName).ConfigureAwait(false);
       
                  await conn.Bucket.WaitUntilReadyAsync(TimeSpan.FromSeconds(30)).ConfigureAwait(false);
      

      Problem is the wait until ready never completed, but failed quickly with a NullReferenceException:

         Couchbase.CouchbaseException: An error has occurred, see the inner exception for details.
       ---> System.NullReferenceException: Object reference not set to an instance of an object.
         at Couchbase.Diagnostics.DiagnosticsReportProvider.GetEndpointDiagnosticsAsync(ClusterContext context, IEnumerable`1 clusterNodes, Boolean ping, ICollection`1 serviceTypes, CancellationToken token) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-net-client/src/Couchbase/Diagnostics/DiagnosticsReportProvider.cs:line 64
         at Couchbase.Diagnostics.DiagnosticsReportProvider.CreatePingReportAsync(ClusterContext context, BucketConfig config, PingOptions options) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-net-client/src/Couchbase/Diagnostics/DiagnosticsReportProvider.cs:line 42
         at Couchbase.Core.BucketBase.WaitUntilReadyAsync(TimeSpan timeout, WaitUntilReadyOptions options) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-net-client/src/Couchbase/Core/BucketBase.cs:line 208
         --- End of inner exception stack trace ---
         at Couchbase.Core.BucketBase.WaitUntilReadyAsync(TimeSpan timeout, WaitUntilReadyOptions options) in /Users/michaelnitschinger/couchbase/code/dotnet/couchbase-net-client/src/Couchbase/Core/BucketBase.cs:line 249
         at Couchbase.Transactions.FitPerformer.Utils.ClusterConnection.CreateAsync(CreateConnectionRequest request) in /Users/michaelnitschinger/couchbase/code/dotnet/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/Utils/ClusterConnection.cs:line 31
         at Couchbase.Transactions.FitPerformer.PerformerTransactionServiceImpl.createConnection(CreateConnectionRequest request, ServerCallContext context) in /Users/michaelnitschinger/couchbase/code/dotnet/transactions-fit-performer/performers/dotnet/Couchbase.Transactions.FitPerformer/PerformerTransactionService.cs:line 36
      

      Attachments

        Issue Links

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

          Activity

            There are no comments yet on this issue.

            People

              richard.ponton Richard Ponton
              daschl Michael Nitschinger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty