Reading of DBname.system.indexes failed on Atlas cluster by mongobee after getting connected

后端 未结 4 1139
感动是毒
感动是毒 2021-01-20 03:31

I have a Jhipster Spring boot project. Recently I shifted from mlabs standalone sandboxes to Atlas cluster sandbox M0 Free tier replica set. It even worked and I h

4条回答
  •  时光取名叫无心
    2021-01-20 03:54

    After discussion with MongoDB support team, MongoDB 3.0 deprecates direct access to the system.indexes collection, which had previously been used to list all indexes in a database. Applications should use db..getIndexes() instead.

    From MongoDB Atlas docs it can be seen that they may forbid calls to system. collections:

    Optionally, for the read and readWrite role, you can also specify a collection. If you do not specify a collection for read and readWrite, the role applies to all collections (excluding some system. collections) in the database.

    From the stacktrace it's visible that MongoBee is trying to make this call, so it's now the library issue and it should be updated.

    UPDATE: In order to fix an issue until MongoBee has released new version:

    1. Get the latest sources of MongoBee git clone git@github.com:mongobee/mongobee.git, cd mongobee
    2. Fetch pull request git fetch origin pull/87/head:mongobee-atlas
    3. Checkout git checkout mongobee-atlas
    4. Install MongoBee jar mvn clean install
    5. Get compiled jar from /target folder or local /.m2
    6. Use the jar as a dependency on your project

提交回复
热议问题