Shell and Server versions do not match SOLVED

When I start the mongo shell with:
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/aggregations?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

I get the error message, “Shell and Server versions do not match”

When I tried adding the details of the error message, it says, “Sorry, new users can only add two links”. So, here is a screenshot, rather than the actual text copied.

This is a problem when trying to start the mongo shell using the --shell option and providing the file “aggregation_structure.js” containing the db.solarSystem.aggregate call:

When I googled the problem, the first solution said to stop, then restart mongod. I tried that, but the error persists.

I downloaded vsn 3.6.7 from the mongodb archive and that solved the problem.

Great! Glad you managed it to work!

Hello,

So I have a similar problem here myself. My MongoDB shell version is 4.0.4 and the Server version is 3.6.8.

I assume the Server version is what you guys have, right? So I can’t update that myself. Does that mean I need to reinstall an older version of my MongoDB shell version to make it work, or is there another way to work around this issue?

PS: This is occurring while I’m trying to connect to the cluster in course M121 in Chapter 1

Hi,

I believe the problem raises if you have an older version. It should be OK if you are using MongoDB 4.0.4.

José Carlos