MongoDB - WARNING: shell and server versions do not match

15 July,2019 by Jack Vamvas

Question :

Getting this WARNING when logging on to mongo

 

MongoDB shell version v3.4.9

connecting to: mongodb://127.0.0.1:27017/

MongoDB server version: 3.6.12

WARNING: shell and server versions do not match

 

I’ve restarted mongo which hasn’t fixed the issue .

Can I install manually or is this something pushed down from Ops Manager ?

Answer: In this situation there are two options

Copy the latest binary into /usr/bin or use the latest mongo shell version.

To get the information require , execute this command ps -ef | grep -i mongod

ps -ef | grep -i mongod

mongod    8138     1 43 May27 ?        18-05:38:54 /var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.12-ent/bin/mongod -f /xtra200/mongodb/appnew_0/automation-mongod.conf

 

option 1:Copy the latest binaries into /usr/bin

cp /var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.12-ent/bin/* /usr/bin

 

option 2:Use the latest version of mongo shell version 

 

/var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.12-ent/bin//mongo

 

/var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.12-ent/bin/mongo

MongoDB shell version v3.6.12

connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb

Implicit session: session { "id" : UUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxx") }

MongoDB server version: 3.6.12

 


Author: Jack Vamvas (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on MongoDB - WARNING: shell and server versions do not match


dba-ninja.com