I connect to mongo servers that are not local. I use mongoose. And at some point I needed to connect to the mongo native driver, so I do it like:
mongoose.mongo.MongoClient.connect(uri, function (err, conn) {});
but connan object null.
Recently, I changed the structure of the servers, and now all the mongo databases are deleted, and on my new node machines I do not have the mongo shell installed at all ... At first everything worked fine, and the uri connection was:
mongodb:
where x.x.x.x:27017was the main one, after some time due to a break in the initial primary, a new primary element was selected, and now I start with the same uri, but the connection object null, and I don't know why ...
is there anyone who had a similar problem? or maybe a solution or an idea ....