LearnBoost/mongoose — Issue #625: problem using latest version of node
Author: dlamp
Created: 2011-11-25 21:08:11+00:00
State: open

When I try to connect via mongoose running 0.6.0-3, I get error connect EHOSTUNREACH. If I run it under 0.4.12 it connects fine. See code below:

var mongoose = require('mongoose');

var db = mongoose.connect('mongodb://localhost/test', function (error) {
if(error) {
console.log("error establishing connection to mongo : " + error);
throw "error establishing connection to mongo : " + error;
}
else {
console.log("connection to mongo opened");
}
} );