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

ConnectAsync throws ArgumentNullException when cluster cannot be reached

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.0.2
    • 3.0.0-beta.4
    • library
    • None
    • 1
    • SDK14: Tracing/Otel

    Description

      If you attempt to connect to a cluster using an address that is unreachable, ClusterAsync throws an ANE because the DNS cannot be resolved; this should be handled better and propagate an error that points the user to a solution.

      System.ArgumentNullException : Value cannot be null.
      Parameter name: endPoint
         at Couchbase.Core.ClusterNode..ctor(ClusterContext context, IConnectionPoolFactory connectionPoolFactory, ILogger`1 logger, ITypeTranscoder transcoder, ICircuitBreaker circuitBreaker, ISaslMechanismFactory saslMechanismFactory, IRedactor redactor, IPEndPoint endPoint) in C:\Users\Jeff Morris\source\couchbase-net-client\src\Couchbase\Core\ClusterNode.cs:line 51
         at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpoint endPoint, CancellationToken cancellationToken) in C:\Users\Jeff Morris\source\couchbase-net-client\src\Couchbase\Core\DI\ClusterNodeFactory.cs:line 48
         at Couchbase.Core.ClusterContext.BootstrapGlobalAsync() in C:\Users\Jeff Morris\source\couchbase-net-client\src\Couchbase\Core\ClusterContext.cs:line 246
         at Couchbase.Cluster.Couchbase.Core.Bootstrapping.IBootstrappable.BootStrapAsync() in C:\Users\Jeff Morris\source\couchbase-net-client\src\Couchbase\Cluster.cs:line 375
         at Couchbase.Cluster.ConnectAsync(ClusterOptions options) in C:\Users\Jeff Morris\source\couchbase-net-client\src\Couchbase\Cluster.cs:line 119
         at Couchbase.IntegrationTests.Fixtures.ClusterFixture.InitializeAsync() in C:\Users\Jeff Morris\source\couchbase-net-client\tests\Couchbase.IntegrationTests\Fixtures\ClusterFixture.cs:line 70
      

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            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