Unable to connect to Atlas from Node app on Windows

Hi ,
I am unable to connect to mongodb …i get following error. pls suggest
C:\Users\asinh015\Desktop\backend>npm run start

backend@1.0.0 start C:\Users\asinh015\Desktop\backend
nodemon server.js

[nodemon] 2.0.4
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node server.js
You are connected http://127.0.0.1:8080!
catch Error: queryTxt ETIMEOUT cluster0-bvqvo.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19) {
errno: ‘ETIMEOUT’,
code: ‘ETIMEOUT’,
syscall: ‘queryTxt’,
hostname: ‘cluster0-bvqvo.mongodb.net
}

Can you connect to your mongodb by shell?

May be network or DNS issues preventing your connection

1 Like

you are right…there was a network issue…Thank you :slight_smile:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.