-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.4.9
-
Component/s: None
-
Labels:
-
Empty show more show less
This is on Windows, with Git Bash. Even though I have a couple Linux machines, something is messed up in them so I couldn't test there.
I'm trying to connect to hosts specified in my "hosts" file (dev machine). I am able to make a mongo server on these hosts with mongod (e.g. "mongod --bind_ip example"), and connect with the appropriate mongo shell command (e.g. "mongo --host example"). However, I am unable to connect with the mongo driver for node. Some example input/output:
mongoclient = require('mongodb').MongoClient;
mongoclient.connect('example', function(err, db) {
if(err) console.log(err);
else console.log(db);
});
undefined
// after a couple seconds
[Error: failed to connect to [example:27017]]
What am I doing wrong? Is the mongo driver not waiting long enough or something? Or is this an actual bug?