Resume of change stream was not possible, as the resume point may no longer be in the oplog (by MongoSourceConnector)

I am using change stream through Mongo Source Connector. Suddenly, the connector has made continuous logs like below and stopped working:

INFO An exception occurred when trying to get the next item from the Change Stream: Query failed with error code 286 and error message 'Error on remote shard **.***.**.**:***** :: caused by :: Resume of change stream was not possible, as the resume point may no longer be in the oplog.' on server **.***.**.**:***** (com.mongodb.kafka.connect.source.MongoSourceTask:597)

I got some answer like “Increase the oplog size!” after googling, but I want to know more:

  1. I guess, this issue could be seen even after I increase the oplog size again. So I think increasing the oplog size is not that ultimate solution.
  2. (Let alone the reason of the issue,) How can I resume(restart) the mongo source connector to work again? It doesn’t produce any Kafka message now…

NOTE: My mongo collections have been sharded.

Anyone helps? T.T
I am waiting for your help!

There is an article related to invalid resume tokens.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.