Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3943

Problem connect AKS to mongodb

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      We have application on .Net in Azure AKS. We have connect from CLI with pods, node, VM in this virtual network to private and to public link in Mongodb Atlas, but we can't connect from application in this pods. But if we expand the second node, and transfer this pod to the second node, the application works. We turn off the first node and the application does not work. We raise node 1 and transfer it to applications and the application works and connects to the Mongo database.
      If it is not possible to connect to monga, the following messages appear in the logs:
      System.TimeoutException: A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector

      { AllowedLatencyRange = 00:00:00.0150000 }

      , OperationsCountServerSelector }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [] }.
      at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)
      at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)
      at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChanged(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Clusters.Cluster.SelectServer(IServerSelector selector, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoClient.AreSessionsSupportedAfterServerSelection(CancellationToken cancellationToken)
      at MongoDB.Driver.MongoClient.AreSessionsSupported(CancellationToken cancellationToken)
      at MongoDB.Driver.MongoClient.StartImplicitSession(CancellationToken cancellationToken)
      at MongoDB.Driver.OperationExecutor.StartImplicitSession(CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.Distinct[TField](FieldDefinition`2 field, FilterDefinition`1 filter, DistinctOptions options, CancellationToken cancellationToken)
      at MongoDB.Driver.IMongoCollectionExtensions.Distinct[TDocument,TField](IMongoCollection`1 collection, Expression`1 field, FilterDefinition`1 filter, DistinctOptions options, CancellationToken cancellationToken)

      Attachments

        Activity

          People

            james.kovacs@mongodb.com James Kovacs
            p.shapurau@sdventures.com Pavel Shapurau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: