PBM Mongod URI connection String

Hello,

I’m trying to use PBM and here is the details of my MongoDB replicat set sharded cluster :
3 serveurs
On each one, i’ve got a mongos (port 27017), mongod = data (port 27018) and mongoc = config (port 27019)
mongodb version : 4.2.12

As far as I read and tested, the pbm-cli must be plugged to the mongoc when we are in a sharded cluster and I also have a pbm-agent with a separate unit than run with mongoc specific URI

But the second part is to also have a pbm-agent running on the mongod as the documentation says.
But for now, I got this error
connect to PBM: create mongo connection: mongo ping: connection() error occured during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed

When I try use the MONGODB_URI that the documentation says that should work :

Edit the environment file and specify MongoDB connection URI string for the pbm user to the local mongod node. For example, if mongod node listens on port 27018, the MongoDB connection URI string will be the following:

PBM_MONGODB_URI=“mongodb://pbmuser:secretpwd@localhost:27018”

So I searched online and found that in a replicat sharded cluster, if you want to connect to mongod , you must use the mongos in the MONGODB_URI
I changed the PBM_MONGODB_URI to mongos port and it works but actually the mongos does not support the replSetGetStatus

And here I Am asking for your help or council on this one

Best regards,

1 Like

Hello, in a sharded cluster usually you connect through mongos but you can also still connect to the individual nodes for maintenance operations. In this case the backup needs access to the local node as the documentation says so go ahead and create the pbmuser locally on each mongod and configure the PBM_MONGODB_URI as per the doc.

2 Likes

Hello,

Thank you a lot ! I didn’t know that. I guess I was missing that part on how mongo sharded cluster works

It’s still a bit confusing between shardname, replicatSet, replSetName and how everything works together but I’ll get there !

Best regards,

1 Like