Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongoDB cluster can not connect error #187

Open
JyothsnaVellampalli opened this issue Feb 16, 2024 · 1 comment
Open

mongoDB cluster can not connect error #187

JyothsnaVellampalli opened this issue Feb 16, 2024 · 1 comment

Comments

@JyothsnaVellampalli
Copy link

While running server, I got this error,
Error: querySrv ENOTFOUND _mongodb._tcp.practice.jto9p.mongodb.net did not connect

Kindly add correct mongo url.

@PY-SENSEI
Copy link

@JyothsnaVellampalli hi,
there can be many reasons for that one I might think is :

  1. your connection string : make sure your connection string looks something like this
    mongodb+srv://<your_username>:<your_password>@practice.jto9p.mongodb.net/?retryWrites=true&w=majority
    and replace your username and password from MongoDB to here.
    if nothing works pinpoint your error using this:
    const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true, loggerLevel: 'debug' });
    then log the error on chatgpt for further help.
    hope it helps :)
    Happy coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants