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

A timeout occured after 30000ms selecting a server using CompositeServerSelector

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Configuration, Connectivity

      I want to learn C# ASP MVC 5 with mongodb .

      in Tutorial at http://www.c-sharpcorner.com/article/simple-crud-operation-using-asp-net-mvc-and-mongodb/ ,

      My Connection in Attachment .

      at command :
      var carDetails = _dbContext._database.GetCollection<CarModel>("CarModel").FindAll().SetLimit(10).ToList();

      I have a Error :

      A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector

      { AllowedLatencyRange = 00:00:00.0150000 }

      }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "

      { ClusterId : 1, EndPoint : "Unspecified/localhost:27017" }

      ", EndPoint: "Unspecified/localhost:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> MongoDB.Driver.MongoAuthenticationException: Unable to authenticate username 'demouser' on database 'CarDatabase'. ---> MongoDB.Driver.MongoCommandException: Command authenticate failed: auth failed.
      at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.ProcessReply(ConnectionId connectionId, ReplyMessage`1 reply)
      at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.<ExecuteAsync>d__11.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MongoDB.Driver.Core.Authentication.MongoDBCRAuthenticator.<AuthenticateAsync>d__7.MoveNext()
      — End of inner exception stack trace —
      at MongoDB.Driver.Core.Authentication.MongoDBCRAuthenticator.<AuthenticateAsync>d__7.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MongoDB.Driver.Core.Authentication.AuthenticationHelper.<AuthenticateAsync>d__1.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MongoDB.Driver.Core.Connections.ConnectionInitializer.<InitializeConnectionAsync>d__3.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext()
      — End of inner exception stack trace —
      at MongoDB.Driver.Core.Connections.BinaryConnection.<OpenHelperAsync>d__48.MoveNext()
      — End of stack trace from previous location where exception was thrown —
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
      at MongoDB.Driver.Core.Servers.ServerMonitor.<HeartbeatAsync>d__27.MoveNext()" }] }

        1. MongoContext.cs
          1 kB
          Ibnu Setiawan

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            ibnu1995 Ibnu Setiawan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: