You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6f14a98e2d51 dockernodemongo_app "npm start" 7 minutes ago Up 7 minutes 0.0.0.0:3001->3000/tcp docker-node-mongo
f3fb55dad886 mongo "docker-entrypoint.s…" 19 minutes ago Up 19 minutes 127.0.0.1:27017->27017/tcp mongo
this is the error when i type docker logs docker-node-mongo
Server running...
{ MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: getaddrinfo EAI_AGAIN mongo mongo:27017]
at Pool.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/topologies/server.js:562:11)
at Pool.emit (events.js:182:13)
at Connection.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:316:12)
at Object.onceWrapper (events.js:273:13)
at Connection.emit (events.js:182:13)
at Socket.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:245:50)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'MongoNetworkError',
message:
'failed to connect to server [mongo:27017] on first connect [MongoNetworkError: getaddrinfo EAI_AGAIN mongo mongo:27017]',
errorLabels: [ 'TransientTransactionError' ],
[Symbol(mongoErrorContextSymbol)]: {} }
The text was updated successfully, but these errors were encountered:
here is my docker-compose.yml:
my index.js
and this when i run docker container ls -a
this is the error when i type docker logs docker-node-mongo
The text was updated successfully, but these errors were encountered: