Configuration check failed Target MongoDB instance...
# ask-ai
a
Configuration check failed Target MongoDB instance is not a replica set cluster. help cant connect with connection string
k
The error "Target MongoDB instance is not a replica set cluster" indicates that Airbyte requires your MongoDB instance to be configured as a replica set, not as a standalone server. This is a strict requirement for both the MongoDB source and destination connectors in Airbyte. Key points from the documentation: - The Airbyte MongoDB connectors only support the [replica set](https://www.mongodb.com/docs/manual/replication/) cluster type. Standalone MongoDB instances are not supported and will result in this error during the configuration check. - TLS/SSL is also required by the connector. For self-hosted MongoDB, you must enable TLS/SSL as well as configure your instance as a replica set. Standalone mode or lack of TLS/SSL will prevent successful connection setup in Airbyte. - If you are running a self-hosted MongoDB, you need to follow the official MongoDB documentation to convert your instance to a replica set and enable TLS/SSL. See the [MongoDB documentation on replica sets](https://www.mongodb.com/docs/manual/replication/) and [TLS/SSL configuration](https://docs.mongodb.com/manual/tutorial/configure-ssl/) for guidance. - This limitation is explicitly stated in the Airbyte documentation: > "Only supports replica set cluster type. TLS/SSL is required by this connector." [Troubleshooting MongoDB Sources - Connector Limitations](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations) What you should do: 1. Convert your MongoDB instance to a replica set if it is currently running as a standalone server. 2. Ensure TLS/SSL is enabled on your MongoDB instance. 3. Use the correct connection string for a replica set, which typically includes multiple hosts and the replica set name. If you need help with the conversion process, refer to the official MongoDB documentation for [converting a standalone to a replica set](https://www.mongodb.com/docs/manual/tutorial/convert-standalone-to-replica-set/). If you continue to have issues after making these changes, please provide your connection string and configuration details (without sensitive information), and I can help review them.
a
@kapa.ai is there an older version that can connect standalone?
k
A message from kapa.ai
Yes, according to the information in the knowledge sources, older versions of the Airbyte MongoDB connectors did support connecting to standalone MongoDB instances. Specifically, support for standalone clusters was available in connector versions prior to 1.0.0. This support was removed in later versions, which now require a replica set configuration for MongoDB connections. From the Airbyte roadmap and migration documentation: - “MongoDB clusters of type ‘standalone’ (no replica sets)” are listed as unsupported in the new connector versions, and a user specifically asked if support for standalone clusters would be reintroduced, noting it was available in versions < 1.0.0 [source](https://github.com/airbytehq/airbyte/issues/28024). If you need to connect to a standalone MongoDB instance, you would need to use a version of the connector older than 1.0.0. However, please note that these older versions are no longer maintained and may lack important features and security updates. If you are using the destination-mongodb connector, some users have reported that version 0.1.9 worked for standalone connections [source](https://github.com/airbytehq/airbyte/issues/30504). Summary: - Standalone MongoDB support existed in connector versions < 1.0.0. - Newer versions (1.0.0 and above) require a replica set. - Using an older version may allow you to connect to a standalone instance, but it is not recommended for production use due to lack of support and updates.
a
i can now sync but it wont detect some fields, any idea how to fix it
@kapa.ai i can now sync but it wont detect some fields, any idea how to fix it
k
A message from kapa.ai
The issue you're experiencing—where some fields are not detected during schema discovery—is a known limitation of the Airbyte MongoDB connector. Airbyte uses sampling to discover the schema: it inspects a configurable number of documents (by default, 10,000) to determine which fields exist. If a field is rare or only appears in a small subset of documents, it may not be included in the discovered schema if it isn't present in the sampled documents ([MongoDB v2 Troubleshooting](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations)). How to improve field detection: - Increase the sample size: In the MongoDB connector settings, you can increase the "Document discovery sample size (Advanced)" to a higher value (up to 100,000). This increases the likelihood that rare fields will be detected, but will also make schema discovery take longer ([source](https://github.com/airbytehq/airbyte/issues/42862)). - Schema enforcement: If your collection has highly variable documents, Airbyte may still miss some fields. There is currently no built-in way to manually define or edit the schema in the UI. Disabling schema enforcement will sync all data as a blob, but this may not be suitable if you need structured fields in your destination ([MongoDB v2 Replication Methods](https://docs.airbyte.com/integrations/sources/mongodb-v2#replication-methods)). - Manual schema editing: Some advanced users have edited the catalog in the Airbyte database directly, but this is not officially supported or recommended ([source](https://github.com/airbytehq/airbyte/issues/42862)). Summary: - Increase the sample size in the connector settings to improve field detection. - If you need all fields reliably, consider restructuring your data so important fields are always present, or advocate for user-defined schema support (which is being discussed but not yet available). If you have further questions or need help adjusting the sample size, let me know!
a
@kapa.ai i am on older version so changign size of the sample is not possible, any other ideas?
k
A message from kapa.ai
If you are using an older version of the Airbyte MongoDB connector where changing the sample size for schema discovery is not possible, your options are unfortunately quite limited. The knowledge sources confirm that in these versions, schema discovery is based on a fixed sample size, and rare fields may be missed if they are not present in the sampled documents. This is a known limitation and is one of the reasons why later versions introduced a configurable sample size ([source](https://github.com/airbytehq/airbyte/issues/42862)). There is no officially supported way in older versions to manually define or edit the schema, or to increase the sample size. Some users have resorted to advanced, unsupported workarounds such as editing the Airbyte catalog database directly, but this is not recommended and not documented as a safe or stable solution ([source](https://github.com/airbytehq/airbyte/issues/42862)). Summary: - In older versions, you cannot change the sample size or manually define the schema. - Rare fields may be missed if not present in the sampled documents. - There is no officially supported workaround for this limitation in older versions. If you need reliable detection of all fields, you may need to upgrade to a newer connector version that supports configurable sample size, or consider restructuring your data so that important fields are always present in the documents sampled during schema discovery.