mongodb shell version it shows 2.2.1 but db version it is still showing old one 2.2.0 upon upgrading

236 views
Skip to first unread message

arun....@gmail.com

unread,
Feb 10, 2016, 8:19:59 PM2/10/16
to mongodb-user
I am trying to upgrade my current mongodb version 2.2.0 to 3.2.0 so i started first upgrading to 2. then 2.4 then 2.6 and so on..
I restore the 2.20 in my home directory also for testing.
upon upgrading from 2.2.0 to 2.2.1 , on running, the shell version it shows 2.2.1 but db version it is still showing old one 2.2.0
I just copies the binaries of 2.2.1 to 2.2.0..
do i need to upgrade the database also..?
It is running on singe server with auth enabled..

Doug

unread,
Feb 11, 2016, 10:28:42 AM2/11/16
to mongodb-user
Hi Arun,

How is MongoDB being started? Are you manually running the `mongod` process? It sounds like the 2.2.0 version is in your path and you might not be actually running the 2.2.1 version like you think you are.

Cheers!

~Doug

arun....@gmail.com

unread,
Feb 11, 2016, 11:53:59 AM2/11/16
to mongodb-user
Actually I want to upgrade from 2.2.0 to 3.2 so want to test in my home dir first
Actually there is a mongodb process already running through mongodb id in mongodb home dir.
I copied  the data files dump from mongodb directory of 2..20  through restore in my home directory and I copied the 2.2.1 binaries in my 2.2.0 binaries.
and when I ran from bin folder it is showing 2.2.1 but when running db.version showing 2..2.0.. do we need to do something for data which we copied from 2.2.0?

arun....@gmail.com

unread,
Feb 11, 2016, 11:58:23 AM2/11/16
to mongodb-user

as062a 120792 103294 0 19:07 pts/10 00:00:00 ./mongod --port 27018 --dbpath home/as062a/mongodb/data --auth
as062a 121974 121716 0 19:08 pts/11 00:00:00 grep -i mongo
[as062a@w216554lweb2003 bin]$ ./mongo -u userid -p passwd admin
MongoDB shell version: 2.2.1
connecting to: admin
> db.version()
2.2.0

Stephen Steneker

unread,
Feb 11, 2016, 3:58:33 PM2/11/16
to mongodb-user

On Friday, 12 February 2016 03:58:23 UTC+11, arun.skumar:

as062a 120792 103294 0 19:07 pts/10 00:00:00 ./mongod --port 27018 --dbpath home/as062a/mongodb/data --auth
as062a 121974 121716 0 19:08 pts/11 00:00:00 grep -i mongo
[as062a@w216554lweb2003 bin]$ ./mongo -u userid -p passwd admin
MongoDB shell version: 2.2.1
connecting to: admin
> db.version()
2.2.0

Hi Arun,

A few things to check:

  • Did you restart mongod after upgrading the binaries to a newer version?

  • Does ./mongod --version report the expected version?

  • Are you connecting to mongod on the correct port? Your command line mongod is listening to port 27018 but the mongo session is connecting to the default port (27017).

Regards,
Stephen

Reply all
Reply to author
Forward
0 new messages