# Run PBM remote can not connect to MongoDB

**URL:** <https://forums.percona.com/t/run-pbm-remote-can-not-connect-to-mongodb/24974>\
**Category:** Percona Backup for MongoDB\
**Created:** [September 6, 2023, 3:45am UTC](https://forums.percona.com/t/run-pbm-remote-can-not-connect-to-mongodb/24974 "2023-09-06T03:45:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dung-tien-nguyen](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dung-tien-nguyen/32/11999_2.png) [@dung-tien-nguyen](https://forums.percona.com/u/dung-tien-nguyen)\
**Post date:** [September 6, 2023, 3:45am UTC](https://forums.percona.com/t/run-pbm-remote-can-not-connect-to-mongodb/24974/1 "2023-09-06T03:45:33Z")

</div>

I am implementing MongoDB and PBM using Operator.  
For my project requirements, I wanted to be able to manage and configure backups from outside the MongoDB pod.  
I tried installing the PBM CLI outside the pod, the configuration to storage config and mongodb-uri was successful.  
However, when performing administrative operations such as “ **pbm status** ”, “ **pbm backup -t physical** ”, an error appears: **Error: connect to mongodb: create mongo connection: mongo ping: server selection error** (same as topic: [PMB can not connect to Mongodb](https ://forums.percona.com/t/pmb-can-not-connect-to-mongodb/22647) )

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/b/b10c39cbdab7d5e19091d6e0175a9da42f7e0386.png)

Is there any way I can do what I want?

---

<div class="post-metadata">

**Author:** ![dung-tien-nguyen](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dung-tien-nguyen/32/11999_2.png) [@dung-tien-nguyen](https://forums.percona.com/u/dung-tien-nguyen)\
**Post date:** [September 7, 2023, 3:13am UTC](https://forums.percona.com/t/run-pbm-remote-can-not-connect-to-mongodb/24974/2 "2023-09-07T03:13:17Z")

</div>

I’ve tried insert documents that simulate pbm’s records to the admin.pbmCmd collection. However PBM agent only triggers when I insert data using MongoCompass, it doesn’t work with mongosh and python mongo driver, even though the record is identical.  
Is there something wrong?
