谁能解释在什么情况下会发生以下错误?
database error {
[MongoError: no valid replicaset members found]
name: 'MongoError',
message: 'no valid replicaset members found'
}
这是我连接到副本集的方式:
var url = format("mongodb://%s:%s@%s/%s?authSource=%s&replicaSet=%s&readPreference=%s&readPreferenceTags=%s&connectTimeoutMS=%s&socketTimeoutMS=%s", username, pswd, replicationSet, db, authdb, replicaSetName, readPreference, readPreferenceTags, 5000, 5000);
var db = mongojs(url);