How to update Feature Compatibility Version for mongoDB - mongodb

I am a beginner/self-taught developer and need some help. I created an app half a year ago and when I revisit it today, I noticed my MongoDB is not running as it used to.
One of the err log I got when I ran 'mongod' states:
** IMPORTANT: UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: BadValue: Invalid value for version, found 3.6, expected '4.2' or '4.0'. Contents of featureCompatibilityVersion document in admin.system.version: { _id: "featureCompatibilityVersion", version: "3.6" }. See http://dochub.mongodb.org/core/4.0-feature-compatibility.). If the current featureCompatibilityVersion is below 4.0, see the documentation on upgrading at http://dochub.mongodb.org/core/4.0-upgrade-fcv.
So I have 2 questions...
I don't recall ever updating my mongodb, so I am wondering why it worked before and not now.
I understand that I need to change CompatibilityVersion to 4.0, but MongoDB's documentation states you can only issue the setFeatureCompatibilityVersion against the admin database. What does the admin database mean and how do I access it?
Thank you for your help!

I don't recall ever updating my mongodb, so I am wondering why it worked before and not now.
Well, someone (or something updated it). What version did you install originally and what is the current version?
I understand that I need to change CompatibilityVersion to 4.0, but MongoDB's documentation states you can only issue the setFeatureCompatibilityVersion against the admin database. What does the admin database mean and how do I access it?
Follow the upgrade guide you linked to. It spells out all the steps.

Related

Why does MongoDB advise on upgrading MongoDB incrementally, version-by-version?

Apologies if this question is too open-ended.
I have inherited an aging tech stack and am required to upgrade our 200GB MongoDB Community Edition v3.4 installation (hosted on Ubuntu 20) to MongoDB v5 in order to support some new features.
MongoDB advises that to install v5.0, one must be already on MongoDB v4.4:
https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/
They say that if you are on a version older than 4.4, then you need to incrementally upgrade to v4.4 before upgrading to v5.
However, if you follow the links in that official upgrade tutorial, you will find that in order to upgrade to any version of MongoDB, they insist on you upgrading version-by-version, successively.
So for me on v3.4 the upgrade path will look like this:
v3.4 -> v3.6 -> v4.0 -> v4.2 -> v4.4 -> v5.0.13
Following these tutorials:
https://www.mongodb.com/docs/manual/release-notes/3.6-upgrade-standalone/
https://www.mongodb.com/docs/manual/release-notes/4.0-upgrade-standalone/
https://www.mongodb.com/docs/manual/release-notes/4.2-upgrade-standalone/
https://www.mongodb.com/docs/manual/release-notes/4.4-upgrade-standalone/
https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/
I'm not entirely sure why this is necessary, as the tutorials themselves seem to mostly involve copying over newer binaries and then setting a feature compatibility version in the database config.
To test whether this was necessary I did a mongodump of our entire v3.4 database and then installed a standalone MongoDB v5.0.13 on the same server and then mongorestore to the new v5.0.13 database. Everything seems to work fine, mongorestore spent two hours recreating all the indexes as its last step (something various articles told me would not happen using the mongodump/mongorestore method).
I am able to connect Mongo clients to this new v5.0.13 Community instance without issue. All the data is there and I am able to query it just fine.
So my question is, why does MongoDB strongly advise doing the upgrade incrementally, one version at a time when dumping the database and restoring it to a new version of MongoDB seems to work just fine?
The only issues I have currently is having to rewrite some client code which is using an older Mongo Java driver. This is something I am going to have to do regardless of the upgrade method I used.
Our MongoDB instance is Community Edition and is a single, standalone instance (not a replica set) so I don't know if this matters. Perhaps the upgrade process described by MongoDB is for Mongo Cloud or for Enterprise?
I'm just looking for clarification on whether the simpler method I tried is going to cause me issues. Maybe I've missed something I hadn't considered.

Mongodb : An error occurred while loading navigation: Invalid UTF-8 string in BSON document

I installed MongoDB Compass, and I get error message “An error occurred while loading navigation: Invalid UTF-8 string in BSON document”. I can't visualize my data.
Version MongoDB 5.0.3(current)
Windows 10
I tried reinstalling a different version of MongoDB but it didn't help.
I download it on another other computer of the same configuration, everything seems to work.
What could have happened?
P.S. Console commands work without problem.
This is what I see after i click on connect
I just had the same problem with MongoDB Compass and fix it by doing the following:
Uninstall the version of MongoDB Compass that comes by default with the Mongo installation.
I downloaded one of the older versions.
I leave you the link so you can download the previous version which has managed to correct this error.
https://downloads.mongodb.com/compass/mongodb-compass-1.21.2-win32-x64.zip
I fixed this problem with the same MongoDB Compass version shared by Wlogz (1.21.2).
The link is in the previous comment...

Meteor mongodb version

On starting meteor 1.4.1, I get this message:
Your development database is using mmapv1, the old, pre-MongoDB 3.0 database
engine. You should consider upgrading to Wired Tiger, the new engine. The
easiest way to do so in development is to run meteor reset. If you'd like to
migrate your database, please consult
https://docs.mongodb.org/v3.0/release-notes/3.0-upgrade/
I though Meteor looks after the mongodb side of things under the hood and I would need to fix it if it is not broken, Will it be a problem if left as is or should be better to upgrade, and how to go about it? Thanks
You can check it in here.
https://guide.meteor.com/1.4-migration.html#update-to-mongo-3_2
MDG recommended you to update. minimum version supported by metetor1.4 is Mongodb Version 2.6.

Are there any up to date Mongo GUI's left?

This type of question has been asked before but needs a serious update. I'm looking for an up-to-date mongodb gui that supports v3.0.x. Ideally it would also support connection to a MongoDB v3.0.x on a mongos instance over SSL.
AFAIK, none exist.
The most well maintained one that I've found was Robomongo but that is only supporting MongoDB v2.4 and as far as I can see from the Github, their release for v3.0.x support hasn't had much movement for many months.
Other GUIs, like MongoVue and RockMongo seem even more out of date.
Has anyone seen a good up-to-date GUI?
I am using MongoChef on a regular basis and it seems to be actively maintained.
It does support mongodb 3.0.
Please note that the commercial license is not for free.

MongoDB WiredTiger issue

I have work a lot with MongoDB 2.6, then I decide to start using MongoDB 3.0.2.
1) When I create an Database using the shell command, the command return true but
the database is not created.
use NewDatabaseName
2) When i try to create some collections, sometime is created and sometime no
I'm using Debian 64Bit, latest version.
Anybody is having this issue?
MongoDB 3.0 is not compatible with all GUI.
For example today MongoVUE do not work at all.
But MongoDB Management Studio sounds like the only one that really work.
Also here some other post related.
mongodb version 3.0.0 client robomongo mongovue
Yes your problem is GUI-related. You can check out different tools on this page:
http://mongodb-tools.com/
I will most probably be using MongoChef from now on.