<@U04S8PLJWMT> I want to have Mongo as destination...
# ask-ai
w
@kapa.ai I want to have Mongo as destination connector(version0.2.0) with connection to self hosted MongoDB instance hosted on GCP with. For this destionation connector, I want to configure SSH Tunnel config as I have RSA SSH key based authentication available, I am getting following error Configuration check failed Could not connect with provided SSH configuration. Error: null 2025-07-30 232506 info Connector exited, processing output 2025-07-30 232506 info Output file jobOutput.json found 2025-07-30 232506 info Connector exited with exit code 0 2025-07-30 232506 info Reading messages from protocol version 0.2.0 2025-07-30 232506 info INFO i.a.i.d.m.MongodbDestination(main):62 starting destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination 2025-07-30 232506 info INFO i.a.c.i.b.IntegrationCliParser(parseOptions):126 integration args: {check=null, config=/config/connectionConfiguration.json} 2025-07-30 232506 info INFO i.a.c.i.b.IntegrationRunner(runInternal):132 Running integration: io.airbyte.cdk.integrations.base.ssh.SshWrappedDestination 2025-07-30 232506 info INFO i.a.c.i.b.IntegrationRunner(runInternal):133 Command: CHECK 2025-07-30 232506 info INFO i.a.c.i.b.IntegrationRunner(runInternal):134 Integration config: IntegrationConfig{command=CHECK, configPath='/config/connectionConfiguration.json', catalogPath='null', statePath='null'} 2025-07-30 232506 warn WARN c.n.s.JsonMetaSchema(newValidator):278 Unknown keyword order - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword 2025-07-30 232506 warn WARN c.n.s.JsonMetaSchema(newValidator):278 Unknown keyword airbyte_secret - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword 2025-07-30 232506 warn WARN c.n.s.JsonMetaSchema(newValidator):278 Unknown keyword multiline - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword 2025-07-30 232506 info INFO i.a.c.i.b.s.SshTunnel(getInstance):252 Starting connection with method: SSH_KEY_AUTH 2025-07-30 232506 info INFO i.a.c.i.b.IntegrationRunner(runInternal):231 Completed integration: io.airbyte.cdk.integrations.base.ssh.SshWrappedDestination 2025-07-30 232506 info INFO i.a.i.d.m.MongodbDestination(main):64 completed destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination 2025-07-30 232506 info Checking for optional control message... 2025-07-30 232506 info Writing output of 8b746512-8c2e-6ac1-4adc-b59faafd473c_12af9c09-0104-4e87-b7ac-47c956b3f2a4_0_check to the doc store 2025-07-30 232506 info Marking workload 8b746512-8c2e-6ac1-4adc-b59faafd473c_12af9c09-0104-4e87-b7ac-47c956b3f2a4_0_check as successful 2025-07-30 232506 info Deliberately exiting process with code 0. 2025-07-30 232506 info 2025-07-30 232506 info ----- END CHECK ----- 2025-07-30 232506 info
k
Based on the information in your logs and the available knowledge sources, your error message: > Configuration check failed > Could not connect with provided SSH configuration. Error: null indicates that the Airbyte MongoDB destination connector (version 0.2.0) is unable to establish an SSH tunnel to your self-hosted MongoDB instance on GCP using RSA key authentication. ### Troubleshooting Steps 1. SSH Key Format: Ensure your RSA private key is in PEM format. You can generate it using:
Copy code
ssh-keygen -t rsa -m PEM -f myuser_rsa
The private key should start with
-----BEGIN RSA PRIVATE KEY-----
and end with
-----END RSA PRIVATE KEY-----
. Paste the entire contents into the Airbyte connector configuration screen. The public key must be added to the
authorized_keys
file of the user on your bastion (jump) host. [See: Connecting with SSL or SSH Tunneling](https://docs.airbyte.com/integrations/sources/singlestore#connecting-with-ssl-or-ssh-tunneling) (applies to MongoDB as well per Airbyte docs). 2. Configuration Fields: Double-check all SSH tunnel configuration fields: - SSH Tunnel Method: Set to "SSH Key Authentication". - SSH Tunnel Jump Server Host: Hostname or IP of your bastion server. - SSH Connection Port: Usually 22, unless changed. - SSH Login Username: The OS user on the bastion host (not your MongoDB username). - SSH Private Key: The full PEM-formatted private key. [See: MongoDB Destination Setup](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source) 3. Common Pitfalls: - The error message is generic ("Error: null"), which often means the SSH connection could not be established at all. This could be due to: - Incorrect SSH username or host. - The private key does not match the public key on the bastion. - The bastion does not allow SSH from the Airbyte host. - Network/firewall issues between Airbyte and the bastion, or between the bastion and MongoDB. - Make sure the bastion can connect to the MongoDB instance from its own shell. 4. Connector Version: There are known issues with the MongoDB destination connector (0.2.0) and SSH tunneling, but your log does not show the "Format specifier '%s'" error seen in other cases, so your configuration is being read, but the SSH connection itself is failing. [See: Example of SSH tunnel config and troubleshooting](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source) ### Next Steps - Test your SSH connection manually from the Airbyte host to the bastion using the same key and username:
Copy code
ssh -i /path/to/myuser_rsa <ssh_username>@<bastion_host> -p <port>
- If this works, try connecting from the bastion to MongoDB to ensure end-to-end connectivity. - If you continue to see "Error: null", try enabling more verbose logging on the bastion and MongoDB to catch any connection attempts or errors. If after these steps the issue persists, it may be a connector bug or a subtle configuration issue not covered in the documentation. In that case, consider opening a new issue on the Airbyte GitHub with your configuration (redacting sensitive info) and logs for further assistance. References: - [MongoDB Destination: Getting Started](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source) - [SSH Tunnel Configuration Example](https://docs.airbyte.com/integrations/sources/singlestore#connecting-with-ssl-or-ssh-tunneling) If you need more specific help, please provide your (redacted) SSH tunnel configuration and confirm that manual SSH works as expected.
w
@kapa.ai I am able to connect from my local to bastion server using created RSA SSH key based authentication and from bastion to mongo db instance connectivity is also there.
k
A message from kapa.ai
Thank you for confirming that both SSH key-based access from your local to the bastion and connectivity from the bastion to the MongoDB instance are working. Given this, the Airbyte MongoDB destination connector (version 0.2.0) should, in principle, be able to establish the SSH tunnel if the configuration matches what you use manually. Based on the knowledge sources, here are the key points and checks: 1. SSH Key Format: Airbyte requires the SSH private key to be in RSA PEM format. The key should start with
-----BEGIN RSA PRIVATE KEY-----
and end with
-----END RSA PRIVATE KEY-----
. If your key is in a different format (such as OpenSSH), it will not work. You can convert or generate the correct format using:
Copy code
ssh-keygen -t rsa -m PEM -f myuser_rsa
[See: Connecting with SSL or SSH Tunneling](https://docs.airbyte.com/integrations/sources/singlestore#connecting-with-ssl-or-ssh-tunneling) 2. Configuration Fields: Double-check that you have filled in the following fields correctly in the Airbyte UI: - SSH Tunnel Method: SSH Key Authentication - SSH Tunnel Jump Server Host: Hostname or IP of your bastion - SSH Connection Port: Usually 22 - SSH Login Username: The OS user on the bastion (not the MongoDB user) - SSH Private Key: The full PEM-formatted private key (not a passphrase or public key) [See: MongoDB Destination Setup](https://docs.airbyte.com/integrations/destinations/mongodb#getting-started-airbyte-open-source) 3. Known Issues: There are no explicit troubleshooting steps for a generic "Error: null" in the knowledge sources, but similar issues have been reported when the SSH key format is incorrect or when the configuration does not match what works manually. The documentation and forum posts emphasize the importance of using the correct key format and configuration. 4. Connector Limitations: The knowledge sources do not mention any additional required settings or known bugs for this specific scenario, but do note that only RSA PEM keys are supported, and not all SSH key formats are accepted. There is also no mention of needing to provide both a key and a password—only one authentication method is supported at a time. Summary: If you can connect manually with your key, but Airbyte still fails with "Error: null," the most likely cause is an incorrect key format or a mismatch in the configuration fields. Double-check the key format and ensure all fields in Airbyte match your manual SSH command. If the issue persists, the knowledge sources do not provide further troubleshooting steps for this specific error, and you may need to seek additional support from the Airbyte community or GitHub issues. If you have already verified all of the above and the error remains, the knowledge sources do not contain enough information to provide a more specific solution.