Closed christopherhex closed 5 years ago
I'm not going to be able to realistically repro this because compose no longer allows spinning up MongoDB instances:
Here's a couple thoughts to help out though:
1) Users aren't stored on mongos instances, they're stored in the config servers for the sharded cluster. If auth fails against one mongos but not the other, that probably means that you're connecting to two separate sharded clusters. Is the URI you're using the uri that compose recommends?
2) How did you set up your users? Via createUser()
in the mongodb shell, via compose's UI, somewhere else?
Do you want to request a feature or report a bug? bug What is the current behavior? We're using a connection string that contains the two mongos urls:
What we're seeing is that mongoose/mongodb is sending queries to both mongos instances, but is only correctly authenthicated against one, giving a lot of
not authorized on <db> to execute command
.Please mention your node.js, mongoose and MongoDB version.
5.4.14
3.2.10
(Hosted at Compose.com with 2mongos
instances)8.10.0