PBM agent fails on non-sharded replica set secondaries during topology discovery
Environment
-
MongoDB Community 8.0.34 (production) / 8.0.26 (sandbox)
-
Non-sharded replica set
rs0with primary and secondary members -
MongoDB running in Docker with host-port mapping
-
Authentication enabled using keyFile
-
PBM user:
pbmBackupwithreadWrite,backup,restore,clusterMonitor, andpbmAnyActionprivileges onadmin -
PBM versions tested: 2.9.1, 2.14.0, and 2.17.0 — all exhibit the same failure
Agent connection URI
mongodb://pbmBackup:***@localhost:27027/?authSource=admin&directConnection=true
Problem
The PBM agent connects successfully when pointed at the primary but exits immediately when connected directly to a secondary.
E Exit: connect to PBM: get config server connection URI: mongo: no documents in result
Investigation
MongoDB command logging on the secondary confirms successful authentication followed by these commands:
-
isMaster -
getCmdLineOpts -
find admin.system.version {_id: "shardIdentity"}— returns zero documents, followed by agent exit.
The isMaster response contains normal replica-set fields (setName, secondary, primary, hosts, etc.), without $configServerState or configsvr.
The getCmdLineOpts.parsed response contains only net, replication, and security, with no sharding configuration.
Expected behavior
PBM should recognize the secondary as a member of a non-sharded replica set and initialize successfully.
Actual behavior
PBM attempts config-server URI discovery and exits when shardIdentity is absent.
Impact
PBM agents cannot initialize on secondary members, preventing the intended backup and point-in-time recovery configuration.
Questions for Percona
-
Why does PBM attempt config-server URI discovery on a secondary of a non-sharded replica set?
-
Could another configuration or connection property trigger this behavior?
-
Is this a known issue, and are there additional diagnostics or supported workarounds?