Error while connecting Atlas

Failed global initialization: BadValue need to either provide sslCAFile or specify sslAllowInvalidCertificates

Please share the command you are using to connect.


mongo “mongodb://,,” --ssl --authenticationDatabase admin --username agamjain14 --password Mongo12

Any Help
I am new to MongoDB. Cannot connect to atlas cluster.

@Agam_Jain_03758, Kanika doesn’t start work until later in the day so exercise some patience :wink:

This is the error I am getting

Hi @Agam_Jain_03758,

I am able to connect using the same string. Which version of MongoDB are you using? Make sure its the latest one i.e 4.2.


1 Like

I am using version 3.0
can we have 2 version of MongoDB at the same time?
If yes, then how do we do it?

Yes, you can. Just download MongoDB from the website here.

Then you can unzip it, and use the binary files from there itself. :slight_smile: Example: I use it like this:


This is the error i am getting now after using latest version i.e 4.2

Thanks for sharing the screenshot. I see that you are still not able to connect.

It seems like a network issue.
Are you connected to VPN? or is there firewall which might be blocking the issue.
If you are working from your work system, please try from a different machine.


I am getting the same connection error as shown by @agamjain14. I can connect to the cluster via MongoDB Compass but not from my command prompt. Until yesterday, I was able to connect to the cluster from both of them.

Help. @kanikasingla

Hi Alex_16041
Did you whitelist your IP?
Try to use TLS as suggested in the message

I can connect with the string you provided

Hi @Alex_16041,

Please make sure that any firewall is disabled and you are not connected to vpn. You can also try to connect to your cluster from the home network.

Then try to reconnect to the cluster using the connection string:

mongo “mongodb://,,” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

Please let me know if you have any questions.


1 Like