MongoDB Compass: Current topology does not support sessions

Viewed 4759

All of a sudden I am getting an error - 'Current topology does not support sessions' on MongoDB Compass. I have never seen this before on MongoDB Compass!!!

Below are the details on version/server

MongoDB Compass Version: 1.29.5 (1.29.5)

MongoDB Version: MongoDB 3.0.6 Community

Cluster : Standalone Host : AWS EC2

enter image description here.

3 Answers

I had the similar issue, and it turned out I had several versions of Mongo installed at the same time.

Are you by any change seeing this, running mongo localhost on a Mac? If so, try this: First off, run brew services list. Do you have more than one version running? I had 3.6, 4.2 and 5.1 installed at once. Sadly the older one was in use (and Mongo <4 does not support Sessions. Hence the error you see!)

brew-services-list

Removing old versions, is quite easy. First we stop the service, then we remove all the versions we don't like, and at the end we restart the service. I wanted to remove version 3.6 and 4.2:

brew services stop mongodb-community

brew uninstall mongodb-community@3.6
brew uninstall mongodb-community@4.2

brew services restart mongodb-community

(Perhaps you want to remove all versions of mongodb-community, and re-install the newest version? No problems, just remember to brew upgrade first, then brew install mongodb-community.)

There you go! But .. oh .. perhaps I should have told you to BACK UP YOUR DATA?

My old 3.6-database was using another engine than the brand new one. Therefor I was not able to actually start mongo. Luckily for me, I didn't have any vital data, so I just wiped it all.

How to completely wipe* your mongo:

brew services stop mongodb-community

mv /usr/local/var/mongodb /usr/local/var/mongodb.bak
mkdir /usr/local/var/mongodb

brew services restart mongodb-community

*) As you see, old data is moved to the catalog mongodb.bak.

Related