-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm trying to create a Kubernetes Side-Car container that will help manage the mongo replica set. However, I can't seem to use the CSharp driver to connect to a mongo instance that was started with the --replSet option. I'd like for my C# application to send the
replSetInitiate command. However, the driver refuses to connect by throwing a Timeout exception.
var _mongoClient = new MongoClient("mongodb://localhost:30006/?replicaSet=rs0"); var dbAdmin = _mongoClient.GetDatabase("admin"); var result = await dbAdmin.RunCommandAsync<BsonDocument>("{replSetInitiate : {} }");