WARNING: shell and server versions do not match

Please help, not able to connect to my Sandbox, I got the WARNING: shell and server versions do not match. Thank you!

$ mongo “mongodb+srv://sandbox.wbsxx.mongodb.net/test” --username m001-student --password m001-mongodb-basics
MongoDB shell version v4.4.1
connecting to: mongodb://sandbox-shard-00-02.wbsxx.mongodb.net:27017,sandbox-shard-00-00.wbsoj.mongodb.net:27017,sandbox-shard-00-01.wbsxx.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=atlas-5e7ijb-shard-0&ssl=true
Implicit session: session { “id” : UUID(“eae4a784-825c-4c70-a1e1-d7715faef0e7”) }
MongoDB server version: 4.2.9
WARNING: shell and server versions do not match

You can ignore that message.You must have connected to mongodb
You did not paste full snapshot
DId you get mongo prompt?
I can connect to your cluster by changing substr from wbsxx to wbsoj
Check it out

WARNING: shell and server versions do not match
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise atlas-5e7ijb-shard-0:PRIMARY> db
test
MongoDB Enterprise atlas-5e7ijb-shard-0:PRIMARY> show dbs
admin 0.000GB
local 3.750GB
MongoDB Enterprise atlas-5e7ijb-shard-0:PRIMARY> exit
bye

Thank you so much for your response. I thought I didn’t get connect to my cluster because I didn’t get mongo prompt, there is a blank below the line “WARNING: shell and server versions do not match”

So what happens?.It just hangs there?
Did you try to hit enter?Sometimes it will be slow to connect
It should give some error like connect failed,no digits,timedout etc
How did you come out from mongo command and ran the ls command
Make sure no firewall issues

or try this to connect to Class cluster

mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

1 Like

Thank you so much for your help. It worked fine after I installed Ubuntu for setting up the Bash for Windows 10