# Pbm-agent unable to authenticate using mechanism "SCRAM-SHA-1"

**URL:** <https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821>\
**Category:** Percona Backup for MongoDB\
**Tags:** mongodb\
**Created:** [August 18, 2021, 12:59am UTC](https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821 "2021-08-18T00:59:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelcoelho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michaelcoelho/32/4231_2.png) [@michaelcoelho](https://forums.percona.com/u/michaelcoelho)\
**Post date:** [August 18, 2021, 12:59am UTC](https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821/1 "2021-08-18T00:59:45Z")

</div>

Hi there!

I’ve followed the initial setup on the PBM documentation, i’ve connected my pbm-agent process to the mongoc running on 27019. I’ve created both the role and the user on the admin database on port 27017, which is running my mongos process. I have a sharded cluster with 4 nodes, on each node i have an instance of mongoc, mongod and mongos. When i try pbm status it fails `Error: get status of cluster: connect to `shard1-rs` [shard1-rs/172.31.1.225:27018,172.31.26.195:27018,172.31.47.6:27018]: ping: connection() error occured during connection`. Apparently it fails when connecting to the mongod process on port 27018, mostly `auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.`

Anyone has been through the same error?

---

<div class="post-metadata">

**Author:** ![Andrew\_Pogrebnoi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew_pogrebnoi/32/77_2.png) [@Andrew\_Pogrebnoi](https://forums.percona.com/u/Andrew_Pogrebnoi)\
**Post date:** [August 18, 2021, 9:11am UTC](https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821/2 "2021-08-18T09:11:21Z")

</div>

Hi @michaelcoelho  
I don’t quite understand the topology of your cluster. What `mongoc` stand for? Is this configserver?  
Can you post a full output of `pbm status`?

This error looks like you don’t have a pbm user or you are trying to connect with the wrong creds. Have you created the pbm user on `shard1-rs [shard1-rs/172.31.1.225:27018,172.31.26.195:27018,172.31.47.6:27018]`?

Just in case, the `pbm` user should be created on every replica set. In a sharded cluster, this means every shard replica set and the config server replica set. As well as the instance pbm-agent should be connected to each node (mongod) on every replica set (a configserver replicaset included).

---

<div class="post-metadata">

**Author:** ![michaelcoelho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michaelcoelho/32/4231_2.png) [@michaelcoelho](https://forums.percona.com/u/michaelcoelho)\
**Post date:** [August 18, 2021, 12:29pm UTC](https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821/3 "2021-08-18T12:29:41Z")

</div>

Hei @Andrew_Pogrebnoi , thanks for replying!

the `mongoc` is the config server replica set and `mongos` is the query router. So, i need to spin up two pbm-agent instances on each node, one connected to mongod and the other to config server replicaset?

---

<div class="post-metadata">

**Author:** ![Andrew\_Pogrebnoi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrew_pogrebnoi/32/77_2.png) [@Andrew\_Pogrebnoi](https://forums.percona.com/u/Andrew_Pogrebnoi)\
**Post date:** [August 18, 2021, 2:56pm UTC](https://forums.percona.com/t/pbm-agent-unable-to-authenticate-using-mechanism-scram-sha-1/11821/4 "2021-08-18T14:56:35Z")

</div>

Yes, if you have two mongod processes (mongod and the config server node) on each node then you have to run two pbm-agents. Despite where physically mongod instances (config server included) are running each of them should have its own agent connected. And each replicaset (config server included) should have the pbm user.
