Error in connecting sandbox cluster and compass

while connecting the sandbox cluster to compass at last after adding the favourites and clicking connect it is showing “certificate is not yet valid”

I suspect the date on your computer is not set correctly.

Hi @Kritik_Singh,

Can you please ensure that the date/time on your system is set properly ?

~ Shubham

for me also same it is not connecting. it is throwing error as FailedToParse: Missing value for key ‘replicaSet-Sandbox-shard-0’ in the options for mongodb:// URL: mongodb://sandbox-shard-00-00-8orqd.mongodb.net:27017,sandbox-shard-00-01-8orqd.mongodb.net:27017,sandbox-shard-00-02-8orqd.mongodb.net:27017/test?replicaSet-Sandbox-shard-0

look at the syntax for the uri. yours is wrong. it should be replicaSet= but you have replicaSet-

Hi @noor_basha_ms,

I hope you found @steevej-1495’s response helpful.

Please let us know if you are still facing any issues.

~ Shubham

I’m also having connection issues. I appreciate any assistance you can provide. Thank you very much.

The following works with the shell in a DOS prompt but does not work when using the in-browser IDE.

mongo “mongodb+srv://sandbox.etwoj.mongodb.net/myFirstDatabase” --username m001-student

Within the IDE, the error stream is -->
connecting to: mongodb://sandbox-shard-00-00.etwoj.mongodb.net.:27017,sandbox-shard-00-01.etwoj.mongodb.net.:27017,sandbox-shard-00-02.etwoj.mongodb.net.:27017/myFirstDatabase?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-99vzj7-shard-0&ssl=true
2021-04-05T00:37:12.325+0000 I NETWORK [js] Starting new replica set monitor for …
2021-04-05T00:37:12.436+0000 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set atlas-99vzj7-shard-0
2021-04-05T00:37:12.436+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes …

Welcome to the community!

Have you whitelisted your IP?
Allow it to access from anywhere

Yes, I’ve whitelisted the IP addresses used by this developer laptop, for addresses at the office and home. Unable to connect from either office or home. Did I whitelist incorrectly? Or is there another issue?

Thanks

The IP address of the IDE is not the same as your laptop since it is a VM somewhere on the cloud. For the purpose of the course allow access from anywhere as suggested by @Ramachandra_Tummala.

[EDITED TO ADD]

You may try to whitelist the IP address of the IDE VM. The following command might give you the accurate IP.

curl https://www.whatismyip.com/ | grep 'Your IP'
1 Like

Thank you @steevej and @Ramachandra_Tummala. I’ll give this a try. I appreciate your help.

And of course that worked. Thanks and have a great evening.