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

Unable to take back for this kind of URI as it from mongodb atlas, please help #41

Open
akhilesh2310 opened this issue Jul 22, 2020 · 2 comments

Comments

@akhilesh2310
Copy link

mongodb+srv://username:[email protected]/dbName?retryWrites=true&w=majority

Getting the following error:

{
"message": "invalid schema, expected mongodb",
"error": {},
"title": "ERROR"
}

I tried with mongodb lab url string and it worked but with this not working

@lihaibh
Copy link

lihaibh commented Sep 7, 2020

take a look at the documentation:
https://docs.mongodb.com/manual/reference/connection-string/

this should be the format:
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]

@sujed
Copy link

sujed commented Sep 30, 2020

Hello @akhilesh2310, I had a similar problem where 'mongodb+srv' was the problem. I solved it by going to atlas configuration for the cluster and from there you click on "connect" and choose "connect from application" and choose the older version of the driver where it contains only "mongodb://" without" mongodb+srv:\".

Hope this helps.

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

3 participants