[KAFKA-397] cannot resume stream; the resume token was not found Created: 22/Jan/24 Updated: 01/Feb/24 Resolved: 01/Feb/24 |
|
| Status: | Closed |
| Project: | Kafka Connector |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Anand Singh | Assignee: | Valentin Kavalenka |
| Resolution: | Declined | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Description |
|
We are currently in the process of enabling Change Data Capture (CDC) for a MongoDB database through Debezium. Although we've successfully loaded historical data as part of the CDC configuration, we are facing an error while trying to load incremental data. Mongodb Version : 6.0.10 debezum version :2.2.1 Final Let us know incase of any further information required . 2024-01-22 13:25:05,437 ERROR [updatedata-v22|task-0] Error while attempting to read from change stream on 'rs6': Query failed with error code 280 with name 'ChangeStreamFatalError' and error message 'Executor error during getMore :: caused by :: cannot resume stream; the resume token was not found. {_data: "8265AE6CB1000000032B022C0100296E5A100403FD8102EC5B4F1FB8AA52E32DDD575246645F6964006465AE6CB13FC5B6BE2DCBB6F60004"}' on server [ip]:27017 (io.debezium.connector.mongodb.connection.MongoDbConnection) [debezium-mongodbconnector-update-data-V22-change-event-source-coordinator] |
| Comments |
| Comment by Valentin Kavalenka [ 01/Feb/24 ] |
|
Hi anand.singh@jungleegames.com, The error you are seeing does not necessary mean there is something wrong with either the MongoDB server or the driver. The error states that a change stream cannot be resumed with the specified resumeAfter token because there is no oplog entry corresponding to the resume token. The most obvious reason why this may be is that the token rolled off the oplog. Based on the information you provided, you are using the Debezium connector for MongoDB, not the MongoDB Kafka Connector. Thereby, we may only propose you to consider contacting the Debezium support, as tom.selander@mongodb.com suggested previously. |
| Comment by Anand Singh [ 23/Jan/24 ] |
|
We are getting below error on the Mongodb logs . {"t":\{"$date":"2024-01-22T00:59:17.767+05:30"},"s":"W", "c":"COMMAND", "id":23799, "ctx":"conn3418957","msg":"Aggregate command executor error","attr":{"error":{"code":280,"codeName":"ChangeStreamFatalError","errmsg":"cannot resume stream; the resume token was not found. {_data: \"8265AD6044000000032B022C0100296E5A100403FD8102EC5B4F1FB8AA52E32DDD575246645F6964006465AD60443FC5B6BE2DAB83AE0004\"}"},"stats":{},"cmd":{"aggregate":1,"pipeline":[{"$changeStream":{"fullDocument":"updateLookup","allChangesForCluster":true,"resumeAfter": {"_data":"8265AD602F0000000E2B022C0100296E5A1004917E0BE6BBE14491B525D958D67E425746645F6964006465AD602FB6A851511014BC610004"}}},{"$addFields":{"namespace": {"$concat":["$ns.db",".","$ns.coll"]}}},{"$match":{"$and":[{"namespace":{"$regularExpression": {"pattern":"test.test","options":"i"}}},{"operationType":{"$in":["insert","update","replace","delete"]}}]}},{"$addFields":{"namespace":"$$REMOVE"}}],"cursor":{},"$db":"admin","lsid":{"id":{"$uuid":"403288f7-bffe-42fe-9216-633fcc198e72"}},"$readPreference":{"mode":"secondaryPreferred"}}}} |
| Comment by Tom Selander [ 22/Jan/24 ] |
|
Hi anand.singh@jungleegames.com it doesn't look like the MongoDB Kafka Connector is being used here since this error is being thrown from io.debezium.connector.mongodb.connection.MongoDbConnection. You may consider filing a ticket with Debezium related to this behavior here: https://issues.redhat.com/projects/DBZ/summary |
| Comment by PM Bot [ 22/Jan/24 ] |
|
Hi anand.singh@jungleegames.com, thank you for reporting this issue! The team will look into it and get back to you soon. |