-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.37
-
Component/s: None
-
Environment:All
-
Empty show more show less
When creating an SSL connection to a mongos the documentation would get you to create it with...
MongoClient.connect("mongodb://dumper:dumper@example.1.dblayer.com:10900,example.0.dblayer.com:10901/dbname", {
mongos:
,
}, function(err, db) { ...
Which for other connections works, but with Mongos it will sit in a spin never connecting.
The reason to this is that mongodb-core uses `ca` for it's certificate array. Other connections when preparing options copy the value of sslCA to ca and continue down to making their mongodb-core connection. The MongoS code doesn't do that.
There is a workaround for anyone affected, and thats to add ca: value to the options map too like so:
MongoClient.connect("mongodb://dumper:dumper@example.1.dblayer.com:10900,example.0.dblayer.com:10901/dbname", {
mongos:
,
}, function(err, db) { ...
And the connection will then work.