[英]connect mongoose mongodb atlas ec2 aws
If I connect from localhost, then everything is fine, if I connect from ec2 aws - error "[Error: No valid replicaset instance servers found]" 如果我从本地主机连接,则一切正常,如果我从ec2 aws连接-错误“ [错误:找不到有效的副本集实例服务器]”
code is the same, on localhost and on ec2 ubuntu 本地主机和ec2 ubuntu上的代码是相同的
mongoose.connect('mongodb://:@cluster0-shard-00-00-llnwa.mongodb.net:27017,cluster0-shard-00-01-llnwa.mongodb.net:27017,cluster0-shard-00-02-llnwa.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin'); mongoose.connect('mongodb://:@ cluster0-shard-00-00-llnwa.mongodb.net:27017,cluster0-shard-00-01-llnwa.mongodb.net:27017,cluster0-shard-00-02 -llnwa.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.