Home > Back-end >  User field missing in system.profile collection when connecting with Mongos
User field missing in system.profile collection when connecting with Mongos

Time:10-02

We have a MongoDB cluster and clients connecting to it through a Mongos instance. The individual mongo(s) in the cluster are all running with --auth, and the Mongo use a --keyfile when communicating with them. We are profiling slow queries but are not getting the user names on queries that go through Mongo.

To make it clearer:

  1. If I connect directly to one of the Mongo, authenticate, and run a query, then I can look in the system.profile collection afterwards, and the user field will be populated with my username.

  2. If I connect through mongos, authenticate, and run a query, then the system.profile collection contains profiling info about the query, but the user field is blank.

The authentication is required, I can't run a query through Mongo without authenticating first, but the user name just doesn't seem to be included in the profiling info, and we'd really like to be able to see it.

Any ideas? Any alterations I can make to our configuration?

CodePudding user response:

Just to actually add an answer:

As Ren stated in his comment, he filed a ticket, as this is related to a bug.

  • Related