<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:36 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[KAFKA-111] Failed to resume change stream: Bad resume token: _data of missing or of wrong type</title>
                <link>https://jira.mongodb.org/browse/KAFKA-111</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;I am testing source and sink MongoDB kafka connector and after it completes init sync and when it start reading from oplog using change streams, I get below failure and stops copying new changes from source. Please take a look.&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;SourceConnector config:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;curl -X POST -H &quot;Accept:application/json&quot; -H &quot;Content-Type: application/json&quot; localhost:9083/connectors/ --data &apos;{&lt;/p&gt;

&lt;p&gt;&quot;name&quot;:&quot;mongo-source-assets-shard1oplog2&quot;,&lt;/p&gt;

&lt;p&gt;&quot;config&quot;: {&lt;/p&gt;

&lt;p&gt;&quot;connector.class&quot;:&quot;&lt;font color=&quot;#2c2c2c&quot;&gt;com.mongodb.kafka.connect.MongoSourceConnector&lt;/font&gt;&quot;,&lt;/p&gt;

&lt;p&gt;&quot;key.converter&quot;:&quot;org.apache.kafka.connect.json.JsonConverter&quot;,&lt;/p&gt;

&lt;p&gt;&quot;key.converter.schemas.enable&quot;:&quot;false&quot;,&lt;/p&gt;

&lt;p&gt;&quot;value.converter&quot;:&quot;org.apache.kafka.connect.json.JsonConverter&quot;,&lt;/p&gt;

&lt;p&gt;&quot;value.converter.schemas.enable&quot;:&quot;false&quot;,&lt;/p&gt;

&lt;p&gt;&quot;connection.uri&quot;:&quot;mongodb://xxx.xxx.xxx.xxx:27017&quot;,&lt;/p&gt;

&lt;p&gt;&quot;database&quot;:&quot;oz_next&quot;,&lt;/p&gt;

&lt;p&gt;&quot;collection&quot;:&quot;assets&quot;,&lt;/p&gt;

&lt;p&gt;&quot;publish.full.document.only&quot;:&quot;true&quot;,&lt;/p&gt;

&lt;p&gt;&quot;topic.prefix&quot;:&quot;oplog.oz_mongo&quot;,&lt;/p&gt;

&lt;p&gt;&quot;batch.size&quot;:&quot;5000&quot;,&lt;/p&gt;

&lt;p&gt;&quot;copy.existing&quot;:&quot;true&quot;,&lt;/p&gt;

&lt;p&gt;&quot;copy.existing.max.threads&quot;:&quot;3&quot;,&lt;/p&gt;

&lt;p&gt;&quot;copy.existing.queue.size&quot;:&quot;64000&quot;}&lt;/p&gt;

&lt;p&gt;}&apos;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;sinkCConector:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;curl -X POST -H &quot;Accept:application/json&quot; -H &quot;Content-Type: application/json&quot; localhost:9083/connectors/ --data &apos;{&lt;/p&gt;

&lt;p&gt;&quot;name&quot;:&quot;mongo-sink-assets-shard1oplog2&quot;,&lt;/p&gt;

&lt;p&gt;&quot;config&quot;: &lt;/p&gt;
{

&quot;topics&quot;:&quot;oplog.oz_mongo.oz_next.assets&quot;,

&quot;connector.class&quot;:&quot;com.mongodb.kafka.connect.MongoSinkConnector&quot;,

&quot;tasks.max&quot;:&quot;1&quot;,

&quot;key.converter&quot;:&quot;org.apache.kafka.connect.json.JsonConverter&quot;,

&quot;key.converter.schemas.enable&quot;:&quot;false&quot;,

&quot;value.converter&quot;:&quot;org.apache.kafka.connect.json.JsonConverter&quot;,

&quot;value.converter.schemas.enable&quot;:&quot;false&quot;,

&quot;connection.uri&quot;:&quot;mongodb://10.74.3.104:27017&quot;,

&quot;database&quot;:&quot;poc_oz_next&quot;,

&quot;collection&quot;:&quot;poc_assets&quot;,

&quot;max.num.retries&quot;:&quot;3&quot;,

&quot;retries.defer.timeout&quot;:&quot;5000&quot;,

&quot;session.timeout.ms&quot;:&quot;25000&quot;}

&lt;p&gt;}&apos;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;connector log:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:40:55,565&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} Finished commitOffsets successfully in 8872 ms (org.apache.kafka.connect.runtime.WorkerSourceTask:515)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:05,566&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:416)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:05,566&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} flushing 4873 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:433)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:13,881&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} Finished commitOffsets successfully in 8315 ms (org.apache.kafka.connect.runtime.WorkerSourceTask:515)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:23,881&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:416)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:23,881&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} flushing 4604 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:433)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:31,322&amp;#93;&lt;/span&gt;&#160;INFO Watching for collection changes on &apos;oz_next.assets&apos; (com.mongodb.kafka.connect.source.MongoSourceTask:374)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:31,326&amp;#93;&lt;/span&gt;&#160;INFO Resuming the change stream after the previous offset (com.mongodb.kafka.connect.source.MongoSourceTask:234)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:31,328&amp;#93;&lt;/span&gt;&#160;INFO Watching for collection changes on &apos;oz_next.assets&apos; (com.mongodb.kafka.connect.source.MongoSourceTask:374)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:31,331&amp;#93;&lt;/span&gt;&#160;INFO Resuming the change stream after the previous offset using resumeAfter (com.mongodb.kafka.connect.source.MongoSourceTask:237)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:31,333&amp;#93;&lt;/span&gt;&#160;INFO&#160;&lt;font color=&quot;#de350b&quot;&gt;Failed to resume change stream: Bad resume token: _data of missing or of wrong type{_id: &quot;52b8348a4b0b1571cbf199af87458512&quot;, copyingData: true} 40647 (com.mongodb.kafka.connect.source.MongoSourceTask:253)&lt;/font&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:32,954&amp;#93;&lt;/span&gt;&#160;INFO WorkerSourceTask{id=mongo-source-assets-shard1oplog2-0} Finished commitOffsets successfully in 9073 ms (org.apache.kafka.connect.runtime.WorkerSourceTask:515)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:35,328&amp;#93;&lt;/span&gt;&#160;INFO Watching for collection changes on &apos;oz_next.assets&apos; (com.mongodb.kafka.connect.source.MongoSourceTask:374)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:35,331&amp;#93;&lt;/span&gt;&#160;INFO Resuming the change stream after the previous offset using resumeAfter (com.mongodb.kafka.connect.source.MongoSourceTask:237)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:35,333&amp;#93;&lt;/span&gt;&#160;INFO&lt;font color=&quot;#de350b&quot;&gt;&#160;Failed to resume change stream: Bad resume token: _data of missing or of wrong type{_id: &quot;7ed0cc7a09af100edc4db27f968231f9&quot;, copyingData: true} 40647 (com.mongodb.kafka.connect.source.MongoSourceTask:253)&lt;/font&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:36,330&amp;#93;&lt;/span&gt;&#160;INFO Watching for collection changes on &apos;oz_next.assets&apos; (com.mongodb.kafka.connect.source.MongoSourceTask:374)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;2020-05-29 08:41:36,334&amp;#93;&lt;/span&gt;&#160;INFO Resuming the change stream after the previous offset using resumeAfter (com.mongodb.kafka.connect.source.MongoSourceTask:237)&lt;br/&gt;
Connection to 10.74.3.79 closed by remote host. change stream: Bad resume token: _data of missing or of wrong type{_id: &quot;7ed0cc7a09af100edc4db27f96823Connection to 10.74.3.79 closed.com.mongodb.kafka.connect.source.MongoSourceTask:253)&lt;/p&gt;</description>
                <environment>Kafka version 2.4.0&lt;br/&gt;
&lt;br/&gt;
Source MongoDB 3.6.8&lt;br/&gt;
Target MongoDB 3.6.8&lt;br/&gt;
Source connector MongoDBSourceConnector version 1.1&lt;br/&gt;
Sink connector MongoDBSinkConnector version 1.1</environment>
        <key id="1370537">KAFKA-111</key>
            <summary>Failed to resume change stream: Bad resume token: _data of missing or of wrong type</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="yaramati@adobe.com">Rajaramesh Yaramati</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Jun 2020 13:02:07 +0000</created>
                <updated>Sat, 28 Oct 2023 10:46:01 +0000</updated>
                            <resolved>Tue, 23 Jun 2020 11:15:53 +0000</resolved>
                                    <version>1.1</version>
                                    <fixVersion>1.2.0</fixVersion>
                                    <component>Source</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4499135" author="ross@10gen.com" created="Fri, 22 Apr 2022 08:16:58 +0000"  >&lt;p&gt;Apologies &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=abdul.basith.kj%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;abdul.basith.kj@gmail.com&quot;&gt;abdul.basith.kj@gmail.com&lt;/a&gt; - I see you opened &lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-311&quot; title=&quot;Failed to resume change stream - Bad resume token&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-311&quot;&gt;&lt;del&gt;KAFKA-311&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4499133" author="ross@10gen.com" created="Fri, 22 Apr 2022 08:15:57 +0000"  >&lt;p&gt;HI &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=abdul.basith.kj%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;abdul.basith.kj@gmail.com&quot;&gt;abdul.basith.kj@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Can you please open a new ticket if you haven&apos;t already resolved your issue?  Please note the error message you have reported comes from the source connector and not the sink connector.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="4498517" author="JIRAUSER1269336" created="Thu, 21 Apr 2022 21:52:25 +0000"  >&lt;p&gt;Hi. I am deploying version 0.28.0 of strimzi kafka operator &lt;a href=&quot;https://artifacthub.io/packages/helm/strimzi/strimzi-kafka-operator&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://artifacthub.io/packages/helm/strimzi/strimzi-kafka-operator&lt;/a&gt; with mongodb sink&#160; connector to stream data from Kafka topic to MongoDb database.&lt;/p&gt;

&lt;p&gt;I get the same error when new data is added to Kafka topic. I get this error in the logs:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;2022-04-21 12:23:20,614 INFO &lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-source-connector|task-0&amp;#93;&lt;/span&gt; Watching for collection changes on &apos;weather.data&apos; (com.mongodb.kafka.connect.source.MongoSourceTask) &lt;span class=&quot;error&quot;&gt;&amp;#91;task-thread-mongodb-source-connector-0&amp;#93;&lt;/span&gt;&lt;br/&gt;
2022-04-21 12:23:20,615 INFO &lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-source-connector|task-0&amp;#93;&lt;/span&gt; Resuming the change stream after the previous offset using resumeAfter (com.mongodb.kafka.connect.source.MongoSourceTask) &lt;span class=&quot;error&quot;&gt;&amp;#91;task-thread-mongodb-source-connector-0&amp;#93;&lt;/span&gt;&lt;br/&gt;
&lt;b&gt;2022-04-21 12:23:20,617 INFO &lt;span class=&quot;error&quot;&gt;&amp;#91;mongodb-source-connector|task-0&amp;#93;&lt;/span&gt; Failed to resume change stream: Bad resume token: _data of missing or of wrong type{_id: 5553a998e4b02cf715119f6e, copyingData: true} 40647 (com.mongodb.kafka.connect.source.MongoSourceTask) &lt;span class=&quot;error&quot;&gt;&amp;#91;task-thread-mongodb-source-connector-0&amp;#93;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="3219091" author="xgen-internal-githook" created="Tue, 23 Jun 2020 11:15:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ross Lawley&apos;, &apos;email&apos;: &apos;ross.lawley@gmail.com&apos;, &apos;username&apos;: &apos;rozza&apos;}
&lt;p&gt;Message: Fix Source connector copying existing resumability&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/KAFKA-111&quot; title=&quot;Failed to resume change stream: Bad resume token: _data of missing or of wrong type&quot; class=&quot;issue-link&quot; data-issue-key=&quot;KAFKA-111&quot;&gt;&lt;del&gt;KAFKA-111&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-kafka/commit/60cadc720d85ecb36e57de792fdb590c06d55fc1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-kafka/commit/60cadc720d85ecb36e57de792fdb590c06d55fc1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3207576" author="ross@10gen.com" created="Mon, 15 Jun 2020 08:52:10 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yaramati%40adobe.com&quot; class=&quot;user-hover&quot; rel=&quot;yaramati@adobe.com&quot;&gt;yaramati@adobe.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I&apos;ll review and try to reproduce the issue locally and fix.&lt;/p&gt;</comment>
                            <comment id="3207155" author="yaramati@adobe.com" created="Sat, 13 Jun 2020 18:16:42 +0000"  >&lt;p&gt;Ross Lawley,&lt;/p&gt;

&lt;p&gt;I was sure connector did not restart during copy. Just to ensure, I tried again from scratch and I still get same issue. Attached full here:&#160;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/265882/265882_bad_resume_token_error.log&quot; title=&quot;bad_resume_token_error.log attached to KAFKA-111&quot;&gt;bad_resume_token_error.log&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;The sequence of steps:&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Created new shared collection.&lt;/p&gt;

&lt;p&gt;Step 2: Imported sample data (10000 doc) into shared collection.&lt;/p&gt;

&lt;p&gt;Step 3: Then started source connector task using REST API as shown in the attached log.&lt;/p&gt;

&lt;p&gt;As soon as source connector completing fetching 10000 docs, started seeing &quot;Failed to resume change stream: Bad resume token: _data of missing or of wrong type&quot; message in log.&#160;&lt;/p&gt;

&lt;p&gt;I am able reproduce this error again and again on my test server.&#160;&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Rajaramesh&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="3196796" author="ross@10gen.com" created="Tue, 9 Jun 2020 10:50:26 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yaramati%40adobe.com&quot; class=&quot;user-hover&quot; rel=&quot;yaramati@adobe.com&quot;&gt;yaramati@adobe.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;It looks like there was a restart of the connector during the copying data phase.  That is an error scenario, so it is expected to stop the connector.  However, only more logs would help determine if that was the case.&lt;/p&gt;

&lt;p&gt;The error messaging should be clearer, so that will be improved in a future release.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="3194648" author="yaramati@adobe.com" created="Mon, 8 Jun 2020 12:58:30 +0000"  >&lt;p&gt;Can anyone please confirm if this is a known issue?&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                                                <inwardlinks description="backports">
                                        <issuelink>
            <issuekey id="2030563">KAFKA-311</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="265882" name="bad_resume_token_error.log" size="23360" author="yaramati@adobe.com" created="Sat, 13 Jun 2020 18:09:18 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxbian:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>