MongoError: getaddrinfo ENOTFOUND mongo mongo:27017
See original GitHub issueHi,
I’m trying run project during to README
/usr/src/app # npm run start
> jincor-backend-ico-dashboard@0.0.1 start /usr/src/app
> nodemon -w ./src -e ts ./src/bin/www --exec ts-node
[nodemon] 1.12.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /usr/src/app/src/**/*
[nodemon] starting `ts-node ./src/bin/www`
TypeORM connection error: { MongoError: failed to connect to server [mongo:27017] on first connect [MongoError: getaddrinfo ENOTFOUND mongo mongo:27017]
at Pool.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:116:13)
at Pool.emit (events.js:211:7)
at Connection.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at Connection.emit (events.js:214:7)
at Socket.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:187:49)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
name: 'MongoError',
message: 'failed to connect to server [mongo:27017] on first connect [MongoError: getaddrinfo ENOTFOUND mongo mongo:27017]' }
JWT was generated successfully, .env
was copied from .env.test
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
mongodb - MongoError: getaddrinfo ENOTFOUND undefined ...
getaddrinfo ENOTFOUND means client was not able to connect to the given address. Please try with the above address. I hope this helps....
Read more >Mongodb remote database connectivity error - getaddrinfo ...
Created a database in free MongoDB Atlas cloud in AWS, ... I am getting following error: getaddrinfo ENOTFOUND mycluster-u8ha7.mongodb.net.
Read more >Got "getaddrinfo ENOTFOUND mongodb replica set." error ...
Hi , I'm a new on use Mongodb. When I deploy the mongodb operator on K8s from this github community,and I want to...
Read more >[Solved]MUP Deploy : MongoError: failed to connect to server ...
[Solved]MUP Deploy : MongoError: failed to connect to server [mongodb:27017] on first connect [MongoError: getaddrinfo ENOTFOUND mongodb mongodb ...
Read more >[COMPASS-4534] Unable to connect with v1.24.1 - Error
In v1.24.1, connections fail with a getaddrinfo ENOTFOUND mongodb ... MongoNetworkError: failed to connect to server [mongodb:27017] on ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was with the same problem and I solved added useUnifiedTopology: true, in const options = { useNewUrlParser: true, useUnifiedTopology: true, }; I hope this helps someone!
@maiziheimei Here is how he fixed it: https://github.com/alexeymarunin/backend-ico-dashboard/commit/ca8fb584476ce08a0383f4421fa5f88779bbbafb