I am using airbyte self hosted version. I am getti...
# replication-ask-ai
m
I am using airbyte self hosted version. I am getting issues in mongo connector. Version of the connector is 2.0.2. While syncing the data from source it itself produces two states and connections strings leads to sync failure
k
MongoDB v2 Connector – Dual State Issue This is a known bug in the
source-mongodb-v2
connector. The issue you're experiencing — where two states are saved with different resume tokens, causing sync failures — was introduced in version 2.0.0 when multiple database support was added. What's happening The connector saves two separate state entries with different
server_id
keys: • One using the normalized connection string (e.g.,
mongodb___xxx
) • One using the raw connection string (e.g.,
mongodb://xxx
) The resume token for one of these entries gets stuck and stops updating, eventually becoming invalid once it falls outside the oplog retention window, causing the
Saved offset is not valid
error. [GitHub Issue] Fix This bug was fixed in version 2.0.4 (released 2025-09-10), which adds validation to ensure state format consistency. After upgrading, the saved state should contain only a single resume token entry. [Changelog] Recommended steps: 1. Upgrade the connector to at least v2.0.4 (or the latest available version, currently 2.0.7). 2. After upgrading, if syncs still fail, you may need to manually update the stuck resume token in the connection state — replace the outdated token with the up-to-date one from the other state entry. 3. If the issue persists after upgrading, reset the connection and ensure your oplog retention window is large enough to cover the time between syncs. Additional recommendations • Ensure your oplog retention is sufficient (at least several days is recommended). • Keep your sync frequency high enough that the resume token never falls outside the oplog window. • When using CDC, make sure at least one synced table has regular data movement so the LSN continues to advance. [GitHub Issue] > Note: Version 2.0.7 further improves resume token validation by using Debezium's own token validation logic to ensure the saved token is present on the server. [Changelog] 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
m
@kapa.ai upgrading the connector version can solve this issue?
k
Yes, upgrading the connector version is the primary recommended fix for this issue. Here's what each relevant version addressed: • v2.0.4 – Fixed the dual-state bug by adding validation to ensure state format consistency. Users confirmed that after upgrading, the saved state contained only a single resume token instead of two conflicting ones. [Changelog] • v2.0.5 – Further reduced the frequency of the
Saved offset is not valid
errors. [GitHub Issue] • v2.0.7 – The most comprehensive fix, using Debezium's own token validation logic to ensure the saved resume token is actually present on the server before proceeding. Users confirmed this version achieved a stable connection after persistent failures. [GitHub Issue] [Changelog] Recommendation Upgrade directly to v2.0.7 (the latest). After upgrading: 1. If syncs still fail immediately after the upgrade, reset the connection once to clear the corrupted dual-state. 2. Ensure your oplog retention is large enough to cover the interval between syncs. 3. Make sure syncs run frequently enough that the resume token stays within the oplog window. > ⚠️ Upgrading alone may not be sufficient if the state is already corrupted — a connection reset may also be needed as a one-time step after upgrading. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
m
@kapa.ai i have upgraded the connector version to 2.0.7 but the issue is still there
k
I'm sorry, but the knowledge sources do not contain enough information to provide a definitive solution for the issue persisting on v2.0.7 specifically. However, based on what is documented in the GitHub issues, here are the known troubleshooting steps: 1. Reset the Connection State After upgrading, if the state is already corrupted (dual resume tokens), a reset is necessary. Go to your connection settings and clear/reset the connection state to remove the invalid saved offset. [GitHub Issue] 2. Manually Fix the Saved State If you don't want to do a full reset, you can: • Check your Connection State in Airbyte • If you see two resume token entries, manually update the outdated one with the value from the up-to-date entry • Trigger a new sync [GitHub Issue] 3. Check Oplog Retention If the dual-state bug is already fixed in your state but syncs still fail, the issue may be oplog retention: • Ensure oplog retains at least 24 hours of changes (a full week is recommended) • Ensure your sync frequency is high enough that the resume token never falls outside the oplog window [MongoDB Troubleshooting] 4. Check Permissions Ensure your MongoDB user has the
readAnyDatabase
role on
admin
, which is required to read the oplog. [GitHub Issue] 5. Contact Airbyte Support Since v2.0.7 is the latest known fix and the issue persists, this may be a unique case. It is recommended to: • Open a new GitHub issue with your logs and state details • If you have a support package, reach out to Airbyte Support directly 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
m
@kapa.ai i getting this error on the logs (using latest v2.0.7 connector) Some streams either received an INCOMPLETE stream status, or did not receive a stream status at all: null.mandate_logs, null.dmf_webhook_logs, null.digilocker_logs, null.communication_templates, null.nsdl_logs, null.dmf_otp_consent, null.gc_api_logs, null.ucclogs io.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.
k
I'm sorry, but the knowledge sources do not contain enough specific information about this exact error (
INCOMPLETE stream status
/
TransientErrorException: Some streams were unsuccessful due to a source error
) to provide a confident, detailed answer. However, based on what is documented, here are some relevant pointers: What This Error Suggests The error indicates that several streams did not complete successfully during the sync. The
null
namespace prefix on all affected streams (e.g.,
null.mandate_logs
) suggests a potential namespace/database resolution issue, which could be related to the multi-database support introduced in v2.0.0. [Migration Guide] Things to Check 1. Reconfigure the
databases
field
– Since v2.0.0, the connector uses a
databases
array instead of a single
database
field. If this was not properly migrated, streams may show
null
as their namespace. Verify your source configuration includes the correct database names in the
databases
array. [Migration Guide] 2. Check CDC permissions – Ensure your MongoDB user has the required
changeStream
and
find
privileges on all affected databases. Missing permissions can cause streams to fail mid-sync. [Troubleshooting] 3. Check Oplog retention – If the oplog window is too small, incremental syncs can fail with incomplete stream statuses. Ensure at least 24 hours (ideally 1 week) of oplog retention. [Troubleshooting] 4. Reset the connection – If the state is corrupted, a full connection reset may be needed. [Migration Guide] Recommended Next Steps Since this is a persistent issue on the latest connector version, I strongly recommend: • Sharing your full sync logs on the Airbyte GitHub Issues page • Reaching out to Airbyte Support at support.airbyte.com with your logs and connector configuration details 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.