-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.4.1
-
Component/s: None
-
Environment:Mongoose 5.8.3 has the issue. 5.8.2 seems to connect just fine.
I noticed the issue when upgrading from mongoose 5.8.2 to 5.8.3 which upgrades the mongodb lib.
More details here:
https://github.com/Automattic/mongoose/issues/8456
Here is the stack trace
{{mongodb://localhost:27018/test_db
dbOptions={"db":
{"native_parser":true},"mongos":{"poolSize":5,"socketOptions":
{"socketTimeoutMS":1000000,"connectTimeoutMS":1000,"keepAlive":120}}}
MongoNetworkError: failed to connect to server [localhost:27018] on first connect [MongoNetworkError: connection timed out
at connectionFailureError (/opt/app/node_modules/mongodb/lib/core/connection/connect.js:377:14)
at Socket.<anonymous> (/opt/app/node_modules/mongodb/lib/core/connection/connect.js:276:16)
at Object.onceWrapper (events.js:299:28)
at Socket.emit (events.js:210:5)
at Socket.EventEmitter.emit (domain.js:476:20)
at Socket._onTimeout (net.js:468:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {
name: 'MongoNetworkError',
[Symbol(mongoErrorContextSymbol)]: {}
}]
at Pool.<anonymous> (/opt/app/node_modules/mongodb/lib/core/topologies/server.js:433:11)
at Pool.emit (events.js:210:5)
at Pool.EventEmitter.emit (domain.js:476:20)
at /opt/app/node_modules/mongodb/lib/core/connection/pool.js:577:14
at /opt/app/node_modules/mongodb/lib/core/connection/pool.js:1007:11
at /opt/app/node_modules/mongodb/lib/core/connection/connect.js:31:7
at callback (/opt/app/node_modules/mongodb/lib/core/connection/connect.js:247:5)
at Socket.<anonymous> (/opt/app/node_modules/mongodb/lib/core/connection/connect.js:276:7)
at Object.onceWrapper (events.js:299:28)
at Socket.emit (events.js:210:5)
at Socket.EventEmitter.emit (domain.js:476:20)
at Socket._onTimeout (net.js:468:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {
name: 'MongoNetworkError',
[Symbol(mongoErrorContextSymbol)]: {}
}}}