Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7638

Debezium Mongodb Connector restart issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • None
    • None
    • False
    • None
    • False
    • Critical

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Mongodb 1.9

      What is the connector configuration?

      {
      "name": "mds_atlas_amr_mongodb_connector_cdc_large1_1",
      "config":

      { "connector.class": "io.debezium.connector.mongodb.MongoDbConnector", "errors.log.include.messages": "true", "max.queue.size": "8192", "topic.creation.default.partitions": "1", "topic.creation.default.max.message.bytes": "20971520", "mongodb.password": "***", "tasks.max": "3", "capture.mode": "change_streams_update_full", "snapshot.delay.ms": "100", "confluent.topic.ssl.endpoint.identification.algorithm": "https", "collection.whitelist": "machinedata.cellular_activity_events,machinedata.therapy_measurements,machinedata.system_activity_events", "provide.transaction.metadata": "true", "tombstones.on.delete": "false", "topic.prefix": "mds_atlas_amr_cdc_large_cdc", "cursor.max.await.time.ms": "500", "mongodb.authsource": "admin", "topic.creation.default.replication.factor": "3", "initial.sync.max.threadsinitial.sync.max.threads": "1", "value.converter": "org.apache.kafka.connect.json.JsonConverter", "database.whitelist": "machinedata", "errors.log.enable": "true", "mongodb.hosts": "config1/10.154.9.121:27017,config2/10.154.10.12:27017,config3/10.154.8.12:27017", "snapshot.fetch.size": "0", "key.converter": "org.apache.kafka.connect.json.JsonConverter", "topic.creation.default.compression.type": "snappy", "confluent.topic.bootstrap.servers": "***", "topic.creation.default.cleanup.policy": "delete", "connect.max.attempts": "16", "mongodb.document.converter.schemas.enable": "false", "mongodb.user": "kafka-user", "mongodb.name": "mds_atlas_amr_cdc_large_cdc", "max.request.size": "2097164", "key.converter.schemas.enable": "false", "producer.override.max.request.size": "20971520", "name": "mds_atlas_amr_mongodb_connector_cdc_large1_1", "value.converter.schemas.enable": "false", "max.batch.size": "2048", "snapshot.mode": "never" }

      What is the captured database version and mode of depoyment?

      EC2's on aws 

       

      What behaviour do you expect?

      When the connector is failed and if i try to restart the connector should restart

      What behaviour do you see?

      It doesn't restart

      Do you see the same behaviour using the latest relesead Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      Using the same version from beginning

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      Yes
      "org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.\n\tat io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50)\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.streamChangesForReplicaSet(MongoDbStreamingChangeEventSource.java:134)\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.lambda$streamChangesForReplicaSets$1(MongoDbStreamingChangeEventSource.java:154)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: org.apache.kafka.connect.errors.ConnectException: Error while attempting to read from oplog on 'sh_7=sh_7/ip-10-154-10-240.us-west-2.compute.internal:27017,ip-10-154-8-76.us-west-2.compute.internal:27017,ip-10-154-9-4.us-west-2.compute.internal:27017'\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.lambda$establishConnectionToPrimary$3(MongoDbStreamingChangeEventSource.java:182)\n\tat io.debezium.connector.mongodb.ConnectionContext$MongoPrimary.execute(ConnectionContext.java:292)\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.streamChangesForReplicaSet(MongoDbStreamingChangeEventSource.java:122)\n\t... 6 more\nCaused by: com.mongodb.MongoCommandException: Command failed with error 286 (ChangeStreamHistoryLost): 'Resume of change stream was not possible, as the resume point may no longer be in the oplog.' on server ip-10-154-8-76.us-west-2.compute.internal:27017. The full response is {\"errorLabels\": [\"NonResumableChangeStreamError\"], \"operationTime\": {\"$timestamp\": {\"t\": 1710301796, \"i\": 1077}}, \"ok\": 0.0, \"errmsg\": \"Resume of change stream was not possible, as the resume point may no longer be in the oplog.\", \"code\": 286, \"codeName\": \"ChangeStreamHistoryLost\", \"$gleStats\": {\"lastOpTime\": {\"$timestamp\": {\"t\": 0, \"i\": 0}}, \"electionId\": {\"$oid\": \"7fffffff0000000000000002\"}}, \"lastCommittedOpTime\": {\"$timestamp\": {\"t\": 1710301796, \"i\": 1077}}, \"$configServerState\": {\"opTime\": {\"ts\": {\"$timestamp\": {\"t\": 1710301796, \"i\": 450}}, \"t\": 44}}, \"$clusterTime\": {\"clusterTime\": {\"$timestamp\": {\"t\": 1710301796, \"i\": 1077}}, \"signature\": {\"hash\": {\"$binary\": {\"base64\": \"zSFlqfR7j0/QObLxgAK9Hd0Zt/s=\", \"subType\": \"00\"}}, \"keyId\": 7286007126802039822}}}\n\tat com.mongodb.internal.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:195)\n\tat com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:400)\n\tat com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:324)\n\tat com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:114)\n\tat com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:603)\n\tat com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:81)\n\tat com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:252)\n\tat com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:214)\n\tat com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:123)\n\tat com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:113)\n\tat com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:328)\n\tat com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:318)\n\tat com.mongodb.internal.operation.CommandOperationHelper.executeCommandWithConnection(CommandOperationHelper.java:201)\n\tat com.mongodb.internal.operation.CommandOperationHelper.lambda$executeCommand$4(CommandOperationHelper.java:189)\n\tat com.mongodb.internal.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:583)\n\tat com.mongodb.internal.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:189)\n\tat com.mongodb.internal.operation.AggregateOperationImpl.execute(AggregateOperationImpl.java:195)\n\tat com.mongodb.internal.operation.ChangeStreamOperation$1.call(ChangeStreamOperation.java:323)\n\tat com.mongodb.internal.operation.ChangeStreamOperation$1.call(ChangeStreamOperation.java:319)\n\tat com.mongodb.internal.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:583)\n\tat com.mongodb.internal.operation.ChangeStreamOperation.execute(ChangeStreamOperation.java:319)\n\tat com.mongodb.internal.operation.ChangeStreamOperation.execute(ChangeStreamOperation.java:58)\n\tat com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:184)\n\tat com.mongodb.client.internal.ChangeStreamIterableImpl.execute(ChangeStreamIterableImpl.java:204)\n\tat com.mongodb.client.internal.ChangeStreamIterableImpl.cursor(ChangeStreamIterableImpl.java:158)\n\tat com.mongodb.client.internal.ChangeStreamIterableImpl.iterator(ChangeStreamIterableImpl.java:153)\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.readChangeStream(MongoDbStreamingChangeEventSource.java:332)\n\tat io.debezium.connector.mongodb.MongoDbStreamingChangeEventSource.lambda$streamChangesForReplicaSet$0(MongoDbStreamingChangeEventSource.java:124)\n\tat io.debezium.connector.mongodb.ConnectionContext$MongoPrimary.execute(ConnectionContext.java:288)\n\t... 7 more\n"

      How to reproduce the issue using our tutorial deployment?

       

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      <Your answer>

            Unassigned Unassigned
            abhilashreddy9676@gmail.com abhilash Reddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: