flapdoodle-oss / de.flapdoodle.embed.mongo

...will provide a platform neutral way for running mongodb in unittests.
Apache License 2.0
907 stars 161 forks source link

UncategorizedMongoDbException: Command failed with error 73 (InvalidNamespace) #532

Closed patriciayogi closed 1 week ago

patriciayogi commented 2 months ago

We upgraded de.flapdoodle.embed to 4.13.1 and the mongo client doesn't work with Mongo V5 or V6. On MAC it works on Mongo V7 version, but our prod environment is on V6.

Ubuntu 18.04 Embed Mongo version to V6_0_15.

Errror:

oorg.springframework.data.mongodb.UncategorizedMongoDbException: Command failed with error 73 (InvalidNamespace): 'Can't create user databases on a --configsvr instance test.tenants' on server localhost:25629. The full response is {"ok": 0.0, "errmsg": "Can't create user databases on a --configsvr instance test.tenants", "code": 73, "codeName": "InvalidNamespace", "lastCommittedOpTime": {"$timestamp": {"t": 1722415486, "i": 1}}, "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1722415486, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType": "00"}}, "keyId": 0}}, "operationTime": {"$timestamp": {"t": 1722415486, "i": 1}}}

    at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:135)
    at 
michaelmosmann commented 2 months ago

@patriciayogi what was the last working version you used?

patriciayogi commented 1 month ago

We upgraded de.flapdoodle.embed from 3.4.7 to 4.13.1

michaelmosmann commented 1 month ago

@patriciayogi i was on vacation..

do you have any special configuration?

michaelmosmann commented 1 month ago

@patriciayogi you can close https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/issues/58 as we can this problem in this issue..

michaelmosmann commented 1 month ago

@patriciayogi can you check if it works on your system at all? You can just build this project https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.canary .. it contains a minimal setup for each spring version.

michaelmosmann commented 1 week ago

@patriciayogi i close this issue.. reopen if needed..