mongodb-js / compass

The GUI for MongoDB.
https://mongodb.com/compass
Other
1.15k stars 176 forks source link

Current topology does not support sessions. When connecting to old standalone 2.4. #2590

Closed lagc03 closed 2 years ago

lagc03 commented 2 years ago

Bug Report

Current Behavior

When fetching documents from a collection, the GUI just displays the following error: Current topology does not support sessions.

Code/Gist

Expected Behavior/Code

Display the documents regardless of the topology.

Environment

Possible Solution

DO not enforce topology setting for connections with legacy versions of MongoDB.

I am using current versions of MongoDB compass to access legacy MongoDB standalone databases currently in production environment. For now I will try to downgrade my compass version and disable updates....

addaleax commented 2 years ago

I am using current versions of MongoDB compass to access legacy MongoDB standalone databases currently in production environment. For now I will try to downgrade my compass version and disable updates

That sounds like the right solution here, tbh. MongoDB 2.4 has been unsupported for a very long time, and we probably wouldn’t fix bugs that only reproduce with versions that old.

ToTheHit commented 2 years ago

Same problem with MongoDB 3.4.9

gribnoysup commented 2 years ago

Hey @ToTheHit, Compass requires your MongoDB version to be at least 3.6 to work properly. We are not trying to break compat for the older versions on purpose, but as @addaleax mentioned above, we are not planning to maintain compatibility with these versions forever, so you should expect some things to not work property. If you want to continue using Compass with unsupported MongoDB version, you can downgrade to the version that will work for you. Sorry for the inconvenience and thanks for using the app!

matthew-b-payne commented 2 years ago

Hey @ToTheHit, Compass requires your MongoDB version to be at least 3.6 to work properly. We are not trying to break compat for the older versions on purpose, but as @addaleax mentioned above, we are not planning to maintain compatibility with these versions forever, so you should expect some things to not work property. If you want to continue using Compass with unsupported MongoDB version, you can downgrade to the version that will work for you. Sorry for the inconvenience and thanks for using the app!

Our version is 3.6.6. We get this error as well. According to your message it should work with 3.6?

image

yurtaev commented 2 years ago

The same issue on mongo v3.6

CleanShot 2021-12-03 at 11 22 57

tanmaybhatt commented 2 years ago

Worked after downgrading to 1.26.0

gribnoysup commented 2 years ago

@matthew-b-payne @yurtaev can you check what feature compatibility version your server is configured to? You can do it with getParameter command:

db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })

And if it's less than 3.6, you can switch it with setFeatureCompatibilityVersion command

jcrochet-24s commented 2 years ago

Same with DocumentDB 3.6 hosted on AWS. Downgrading to 1.28.4 solve the problem. image

gribnoysup commented 2 years ago

DocumentDB doesn't seems to support starting sessions in their 3.6 version