MongoDB "Client has attempted to reauthenticate as a single user"

After updating to latest Meteor and MongoDB 5, our staging deployment’s Mongo logs are filling with these messages (labeled with severity “warning”):

Client has attempted to reauthenticate as a single user

A Google/Duckduckgo search yields zero results with this string.

The only line with this text in MongoDB source code is here.

I’m thinking this is related to our app connecting to two different databases on the same Mongo replicaset using RemoteCollectionDriver

const driver = new MongoInternals.RemoteCollectionDriver(
  // mongodb://app_user:pass@10.0.1.1:27017,10.0.1.2:27017,10.0.1.3:27017/db1?authSource=admin&replicaSet=rs1
  mongoUrl, 
  {
    // mongodb://oplog_user:pass@10.0.1.1:27017,10.0.1.2:27017,10.0.1.3:27017/local?authSource=admin&replicaSet=rs1
    oplogUrl
  }
);

Any help or ideas from the forum’s MongoDB experts?

Full log
{
  "t": { "$date": "2022-03-30T11:27:58.576+00:00" },
  "s": "W",
  "c": "ACCESS",
  "id": 5626700,
  "ctx": "conn23",
  "msg": "Client has attempted to reauthenticate as a single user",
  "attr": { "user": { "user": "__system", "db": "local" } }
},
{
  "t": { "$date": "2022-03-30T11:27:58.576+00:00" },
  "s": "I",
  "c": "ACCESS",
  "id": 20250,
  "ctx": "conn23",
  "msg": "Authentication succeeded",
  "attr": {
    "mechanism": "SCRAM-SHA-256",
    "speculative": false,
    "principalName": "__system",
    "authenticationDatabase": "local",
    "remote": "10.0.1.2:47000",
    "extraInfo": {}
  }
}

Nevermind, I believe this is not about Meteor, since those log messages keep piling up even after I shut down all of our Meteor apps :smiley: Help is still very welcome though!

3 Likes

If anyone here is running MongoDB 5 as a replica set, I’d appreciate if you could look at the logs and tell me if there’s a bunch of Client has attempted to reauthenticate as a single user lines being printed every 5 minutes or so?