I want to create a connection from an existing Mongo DB collection to an existing Docker container. Can anybody see it out.
I tried out several syntaxes and approaches but It always give me error.
Thanks in advance!
player-cloud_1 | error { MongoError: failed to connect to server [cluster0.bgso9.mongodb.net:27017] on first connect [MongoError: getaddrinfo ENOTFOUND cluster0.bgso9.mongodb.net cluster0.bgso9.mongodb.net:27017]
player-cloud_1 | at Pool.<anonymous> (/app/node_modules/mongodb-core/lib/topologies/server.js:336:35)
player-cloud_1 | at Pool.emit (events.js:182:13)
player-cloud_1 | at Pool.EventEmitter.emit (domain.js:442:20)
player-cloud_1 | at Connection.<anonymous> (/app/node_modules/mongodb-core/lib/connection/pool.js:280:12)
player-cloud_1 | at Object.onceWrapper (events.js:273:13)
player-cloud_1 | at Connection.emit (events.js:182:13)
player-cloud_1 | at Connection.EventEmitter.emit (domain.js:442:20)
player-cloud_1 | at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:189:49)
player-cloud_1 | at Object.onceWrapper (events.js:273:13)
player-cloud_1 | at Socket.emit (events.js:182:13)
player-cloud_1 | at Socket.EventEmitter.emit (domain.js:442:20)
player-cloud_1 | at emitErrorNT (internal/streams/destroy.js:82:8)
player-cloud_1 | at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
player-cloud_1 | at process._tickCallback (internal/process/next_tick.js:63:19)
player-cloud_1 | name: 'MongoError',
player-cloud_1 | message:
player-cloud_1 | 'failed to connect to server [cluster0.bgso9.mongodb.net:27017] on first connect [MongoError: getaddrinfo ENOTFOUND cluster0.bgso9.mongodb.net cluster0.bgso9.mongodb.net:27017]' }
player-cloud_1 | error connecting to the database