MongoDB MongoServerSelectionError: getaddrinfo ENOTFOUND
See original GitHub issueIssue Description
When I try to make a normal mongodb connection with typerom@0.2.29 version I get this error:
MongoDB MongoServerSelectionError: getaddrinfo ENOTFOUND [Mongodb Server IP]
but when I try to make a normal mongodb connection with typerom@0.2.25 version it works.
Expected Behavior
Must connect to mongodb server
Actual Behavior
throws this error:
MongoDB MongoServerSelectionError: getaddrinfo ENOTFOUND [Mongodb Server IP]
Steps to Reproduce
- install typeorm@0.2.29
- connect to a mongodb server with default options
typeorm.createConnection({
type: "mongodb",
url: CONFIG.MONGODB_URI,
synchronize: true,
logger: "debug",
useUnifiedTopology: true,
useNewUrlParser: true,
autoLoadEntities: true,
})
My Environment
Dependency | Version |
---|---|
Operating System | Windows10 |
Node.js version | v15.0.1 |
Typescript version | v3.7.4 |
TypeORM version | v0.2.29 |
Additional Context
Relevant Database Driver(s)
-
mysql
-
aurora-data-api
-
aurora-data-api-pg
-
better-sqlite3
-
cockroachdb
-
cordova
-
expo
-
mongodb
-
nativescript
-
oracle
-
postgres
-
react-native
-
sap
-
sqlite
-
sqlite-abstract
-
sqljs
-
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
- Yes, I have the time, and I know how to start.
- Yes, I have the time, but I don’t know how to start. I would need guidance.
- No, I don’t have the time, although I believe I could do it if I had the time…
- No, I don’t have the time and I wouldn’t even know how to start.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:14
- Comments:22 (3 by maintainers)
Top Results From Across the Web
Mongodb remote database connectivity error - getaddrinfo ...
I am getting following error: getaddrinfo ENOTFOUND mycluster-u8ha7.mongodb.net. Can someone pls guide me how to troubleshoot and make this ...
Read more >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 >[COMPASS-4534] Unable to connect with v1.24.1 - Error
Successful connection. Actual Results. Error: getaddrinfo ENOTFOUND mongodb. Observations. When I enter a connection string into *Compass v1.
Read more >Lumber update - getaddrinfo ENOTFOUND mongodb-01
... connect to the database due to the following error: > MongoServerSelectionError: getaddrinfo ENOTFOUND mongodb-01 mongodb-01:27017.
Read more >Meteor 2.6-beta.4 was released today and we need your ...
MongoServerSelectionError : getaddrinfo ENOTFOUND 07e6d85eafb8. The 07e6d85eafb8 is our MongoDB docker container name and we are not sure why ...
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
Fix was merged and will be in
v0.2.30
later this week.Same here, works with
v0.2.28
but not withv0.2.29
, connect url ismongodb+srv://<hidden>:<hidden>@cluster0.fbbdh.mongodb.net/<hidden>?retryWrites=true&w=majority"