Hi,
When I first try to connect, I build my connection string with several default most-likely because I successfully connect as follow:
mongodb://m001-student:m001-mongodb-basics@cluster0-shard-00-00-jxeqq.mongodb.net:27017/admin
When I did the first lab, I read the doc about it and I tried to pass options like this:
mongodb://m001-student:m001-mongodb-basics@cluster0-shard-00-00-jxeqq.mongodb.net:27017/admin?replicaSet=Cluster0-shard-0&ssl=true&readPreference=primaryPreferred
I never succeed to log with these options. I tried to remove them one by one, same result. I must have missed something. I want to know what is wrong because there is a lot of options.
Thanks
Hi @Denis_Gilbert_55813 ,
In this thread you have mentioned that finally you were able to connect. Please let me know if you are still having any issue.
For any other user who might be having similar issue, please use this connection string for connecting to the class atlas cluster from Compass.
mongodb://m001-student:m001-mongodb-basics@cluster0-shard-00-00-jxeqq.mongodb.net:27017/?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=true
Thanks,
Shubham Ranjan
Curriculum Services Engineer
mongodb://m001-student:m001-mongodb-basics@cluster0-shard-00-00-jxeqq.mongodb.net:27017/?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=true
Hi,
I can’t connect with this connection string. I always get the “Server selection timed out after 30000ms” message. What can I do?
Thanks
Hi, Yes I were able to connect without options at the end.
If I understand, your connection string has the following in option
authSource=admin
appname=MongoDB Compass
So if I understand, I cannot pass the authSource in the url ( /admin … ) if I am using the options
or the appName is mandatory.
Please confirm.
Thank You
Hi @Jannick_89527 ,
It could be your network/firewall/anti-virus that might be causing this issue. Please have a look at this post for further instructions.
Please feel free to get back to us if the issue still persists.
Thanks,
Shubham Ranjan
Curriculum Services Engineer
Hi @Denis_Gilbert_55813 ,
You can also use this shorter SRV connection string for connecting to the class atlas cluster.
mongodb+srv://m001-student:m001-mongodb-basics@cluster0-jxeqq.mongodb.net/test
For more information on this you can refer this page .
Hope it helps!
Thanks,
Shubham Ranjan
Curriculum Services Engineer