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

Unable to send replSetInitiate to uninitiated replica set using direct connection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.1
    • Affects Version/s: 2.5
    • Component/s: Command Operations
    • None

      The following throws a timeout exception on the call to RunCommand starting with version 2.5.0:

      var client = new MongoClient("mongodb://hostname/?connect=direct");
      
      var adminDatabase = client.GetDatabase("admin");
      var config = new BsonDocument
      {
          { "_id", "rs" },
          { "members", new BsonArray
              {
                  new BsonDocument
                  {
                      { "_id", 0 },
                      { "host", "hostname:27017" }
                  }
              }
          }
      };
      var command = new BsonDocument("replSetInitiate", config);
      var result = adminDatabase.RunCommand<BsonDocument>(command);
      

      The problem is related to implicit sessions.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: