<@U04S8PLJWMT>: <@U04S8PLJWMT>: Creating a self ma...
# replication-ask-ai
e
@kapa.ai: @kapa.ai: Creating a self managed mongoDB source with. mongoDB endpoint and DB name and Schema Enforced to false results in error while testing the source- Failed to save MongoDb due to the following error: Load failed
k
The knowledge sources don’t mention this exact “Failed to save MongoDb … Load failed” error for a self‑managed MongoDB v2 source, so the following is based on what is documented and may not fully resolve your case. For a self‑managed replica set with MongoDB v2, the expected configuration is: • Cluster Type: Self‑managed replica set • Connection String: A full MongoDB URI for your self‑hosted deployment (not just an endpoint), e.g.
mongodb://host1:27017,host2:27017/?replicaSet=rs0
[Self‑managed schema] • Database Names: One or more database names that contain the collections to sync [Self‑managed schema]. • Username/Password/Auth Source: If authentication is enabled, these must match your MongoDB configuration;
auth_source
defaults to
admin
if not specified. [Self‑managed schema; Config params] • Schema Enforced: Can be set to `false`; this just changes how documents are read and disables schema discovery, it should not by itself cause a load failure. [Replication methods; Schema discovery troubleshooting] Known limitations/issues that might be related: 1. Replica set parameter handling bug (CDC) There is an open issue where the
replicaSet
parameter in the connection string is not correctly passed to Debezium for self‑managed replica sets, causing CDC (incremental) syncs to fail. [ReplicaSet bug] ◦ This affects syncs, not the basic source save step in the UI, but if you are configuring CDC incremental mode it may surface as a load failure later. 2. SSL / deployment limitations ◦ Self‑hosted MongoDB: self‑signed SSL certificates are not supported for SSH tunnels. [Connector limitations] ◦ AWS DocumentDB: custom SSL certificates are not supported. [Connector limitations] If your “endpoint” is actually a managed service with special SSL requirements, this can cause connection/load failures. Given the above, to troubleshoot your specific error: 1. Verify the connection string format ◦ Ensure you are using a full MongoDB URI (including protocol and any replicaSet parameter if applicable), not just a hostname/endpoint. [Self‑managed schema] 2. Confirm required fields for self‑managed replica set ◦
connection_string
and
databases
are required; `username`/`password`/`auth_source` are required if your MongoDB requires auth. [Self‑managed schema] 3. Check for unsupported SSL setups ◦ If you’re using self‑signed certs over SSH or a service like DocumentDB with custom SSL, this is a known limitation and may be the root cause. [Connector limitations] Because the sources don’t include the exact “Load failed” stack trace, I can’t point to a specific bug or setting beyond these documented constraints. If you can, compare your configuration against the Terraform example for a self‑managed replica set and adjust accordingly: [Terraform example]. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.