MongoNetworkError:与ec2-52-220-168-61.ap-southeast-1.compute.amazonaws.com的连接0:27017超时

时间:2018-10-29 12:11:13

标签: node.js amazon-web-services

我尝试通过以下方式连接远程AWS EC2实例,

  **config.js:**

    url: 'mongodb://ec2-52-220-168-61.ap-southeast-1.compute.amazonaws.com:27017/arcusairdbsmc',
    user: "username",
    pass: "password", 

   **server.js:** 

    var options = { user: utils.decrypt(db.user), pass: utils.decrypt(db.pass) };
        mongoose.connect(db.url, options, function(err) {
            if (err) console.log(err);
            utils.mongooseConnected();
        });

登录时,我遇到mongonetworkerror超时,因此我需要有关此问题的帮助。

0 个答案:

没有答案