connect mongodb atlas with node js using mongoose

856 views
Skip to first unread message

Khan Saheb

unread,
May 22, 2019, 8:02:49 AM5/22/19
to mongodb-user
I am trying to connect my node app with MongoDB atlas using mongoose. trouble started when I trying to connect with node driver version 2.2.12 or later connection string it workes fine but using version 3.0 or later connection string I surprisingly getting this error "queryTxt ETIMEOUT " for a better solution I made a conversation in official slack MongoDB Community. they checked every term with my user id and password but they couldn't give me a solution. they refer me here.

admin of the slack Community says:

For technical questions, consider starting a discussion in the mongodb-user discussion forum where your question will reach a larger audience including MongoDB engineering & product team members: https://groups.google.com/group/mongodb-user.

Wan Bachtiar

unread,
Jun 3, 2019, 8:26:46 PM6/3/19
to mongodb-user

trouble started when I trying to connect with node driver version 2.2.12 or later connection string it workes fine but using version 3.0 or later connection string I surprisingly getting this error “queryTxt ETIMEOUT “

Hi Khan,

Could you provide:

  • Snippet code of the connection part (please remove credentials from the connection string)
  • Exact version of mongoose that you’re using
  • The full stacktrace of the error

Regards,
Wan.

taiwo sunday

unread,
Jun 7, 2019, 12:18:52 AM6/7/19
to mongodb-user
I am currently connecting to mongodb atlas with my nodejs app using mongoose.. just post your connection string code here let me see if i can help.remove the credentials on it.

Yash

unread,
Dec 9, 2019, 1:06:35 AM12/9/19
to mongodb-user
mongodb+srv://rishabhgaur:<Password of rishabhgaur database user>@wowview-zhrdv.mongodb.net/test?retryWrites=true&w=majority. This is my connection string code.
Reply all
Reply to author
Forward
0 new messages