我正在成功地将我的mongodb连接到mongoATlas中的一个集群,但是当我尝试连接到heroku时,我得到了这个错误: > UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connection <monitor> to 52.55.178.46:27017 closed
2020-03-29T22:14:32.041176+00:00 app[web.1]: at new MongooseServerSelectionError (/app/node_modules/mongoos
我试图通过post方法将数据保存在mongodb中,并使用mongodb atala和node.js,但它一直给我一个错误,我提供了正确的连接字符串和正确的密码。请在这个问题上提供帮助。谢谢 here is the code:
const mongoose = require('mongoose');
const monngodb_url="mongodb+srv://maarij:asdf360@cluster0-j7wis.mongodb.net/authDB?retryWrites=true&w=majority";
mongoose.con
我遵循这些教程,因为我想从MongoDB和MERN堆栈开始:
在我和数据库的连接失败之前一切都很好。我检查了用户名/密码百万次,复制并粘贴了原始文件,以防语法错误。这是一个错误:
(node:10156) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connection <monitor> to 34.249.129.6:27017 closed
at new MongooseServerSelectionError (C:\Users\Mario\Desktop\ReactProject
我已经将我的IP列入了白名单,并且我已经正确地替换了URI字符串中的用户名和密码(包括密码中的特殊字符),但它不起作用。我也尝试允许从任何地方访问,但结果都是一样的。我得到了这个错误:
Server running on port 5000
MongooseError [MongooseServerSelectionError]: Could not connect to any servers in your MongoDB Atlas cluster. Make sure your current IP address is on your Atlas cluster's IP w
我正试图通过猫鼬驱动程序连接到我的mongodb Atlas,它一直抛出一个MongooseServerSelectionError,并且我已经为数据库用户检查了我的用户名和密码,这是正确的。
这是我的代码:
server running on port 3000
we are connected: { MongooseServerSelectionError: connection timed out
at new MongooseServerSelectionError (/home/ateyib/UCSD-classes/CSE 135/hw3/node_modules/mong
我在k8s中运行了一个k8s,当试图使用mongoose从nodejs连接到nodejs时,这个连接失败了:
MongooseServerSelectionError: connection timed out
at NativeConnection.Connection.openUri (/app/node_modules/mongoo
我是MERN开发的新手,我一直在尝试将用户的用户名、电子邮件和密码添加到数据库中,但是我遇到了这个错误(当我试图在以vscode的json格式连接到数据库之后添加用户时):
[nodemon] 2.0.19
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./index.js`
Example app listening on port 3000
conn
这些日志是在应用程序启动之后反复获得的。
2020-01-22T12:55:34,811 INFO [cluster-ClusterId{value='5e27f56499adc55f60198441', description='null'}-x:27017] com.mongodb.diagnostics.logging.SLF4JLogger: Opened connection [connectionId{localValue:429, serverValue:273700}] to x:27017
2020-01-22T12:55:34,856 IN
所以我决定用两个液滴来建立我的项目,一个MongoDB图像液滴和一个NodeJS图像液滴。我这样做是为了便于将来扩展两个液滴,其他应用程序也可能在将来连接到DB,都是在Ubuntu18.04上。
我得到的错误是:
Could not connect to the database: { MongooseServerSelectionError: connection timed out
at new MongooseServerSelectionError (/root/eternal-peace-code/node_modules/mongoose/lib/error/server
我是MongoDB的新手,我只是在我的Ubuntu终端中设置了MongoDB,其中包含了运行在不同终端中的mongod和mongo命令。然而,我无法得到我的app.js,可以启动一个网站正常运行。下面是代码的开头:
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var exphbs =
我是MongoDB的新手,我只是在我的Ubuntu终端中设置了MongoDB,其中包含了运行在不同终端中的mongod和mongo命令。然而,我无法得到我的app.js,可以启动一个网站正常运行。下面是代码的开头:
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var exphbs =
我得到了错误MongooseServerSelectionError: Server selection timed out after 30000 ms。我正在使用MongoDB地图集。我已尝试将useUnifiedTopology更改为false,但应用程序没有崩溃,但收到错误DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and