以前,我在家中通过wifi连接Atlas没问题。但我在星巴克遇到问题。我现在已切换到Google Fiber,但出现此错误。
at Pool.<anonymous> (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/topologies/server.js:431:11)
at Pool.emit (events.js:182:13)
at connect (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/pool.js:557:14)
at callback (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:109:5)
at runCommand (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:129:7)
at Connection.errorHandler (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connect.js:321:5)
at Object.onceWrapper (events.js:273:13)
at Connection.emit (events.js:182:13)
at TLSSocket.<anonymous> (/Users/j/Desktop/projects/templateApp/node_modules/mongodb-core/lib/connection/connection.js:350:12)
at Object.onceWrapper (events.js:273:13)
at TLSSocket.emit (events.js:182:13)
at _handle.close (net.js:596:12)
at TCP.done [as _onclose] (_tls_wrap.js:383:7)
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],```
I have checked my strings and they are correct.
My connection code is:
```mongoose.connect(process.env.dataBaseConnection, {
dbName: process.env.dataBaseName,
useFindAndModify: false,
useNewUrlParser: true
});```
答案 0 :(得分:0)
问题是我需要将新的IP地址列入白名单。