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

AWS DocumentDB (with MongoDB Compatibility) Connect Fail

    XMLWordPrintable

Details

    Description

      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?

      1.9

      What is the connector configuration?

      {
       "name": "docdb-connector",
       "config":
      {      
      "connector.class" : "io.debezium.connector.mongodb.MongoDbConnector",
        "tasks.max" : "1",
           "mongodb.hosts" : "***.ap-northeast-2.docdb.amazonaws.com:27017",
           "mongodb.name" : "TEST",
           "mongodb.user" : "****",
           "mongodb.password" : "****"
           }
       }
      

      What is the captured database version and mode of depoyment?

      Amazon DocumentDB (with MongoDB Compatibility)

      What behaviour do you expect?

      curl -X GET "http://kafka-connect:8083/connectors/docdb-connector/status"

      status is not FAIL

      What behaviour do you see?

      curl -X GET "http://kafka-connect:8083/connectors/docdb-connector/status"

      {
          "name": "docdb-connector",
          "connector":
      
      {         "state": "RUNNING",         "worker_id": "****:8083"     }
      
      ,
          "tasks": [
      
      {         "id": 0,         "state": "FAILED",         "worker_id": "10.30.26.11:8083",         "trace": "org.apache.kafka.connect.errors.ConnectException:        An exception occurred in the change event producer. This connector will be stopped.       io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50)       io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:116)       java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)       java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)       java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)       java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)       java.base/java.lang.Thread.run(Thread.java:829)       Caused by: io.debezium.DebeziumException: org.apache.kafka.connect.errors.ConnectException: Error while attempting to get oplog position       io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:85)       io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:155)       io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:137)       io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:109)       5 more       Caused by: org.apache.kafka.connect.errors.ConnectException: Error while attempting to get oplog position       io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.lambda$establishConnectionToPrimary$3(MongoDbSnapshotChangeEventSource.java:234)       io.debezium.connector.mongodb.ConnectionContext$MongoPrimary.execute(ConnectionContext.java:292)       io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.lambda$determineSnapshotOffsets$6(MongoDbSnapshotChangeEventSource.java:295)       java.base/java.util.HashMap$Values.forEach(HashMap.java:977)       io.debezium.connector.mongodb.ReplicaSets.onEachReplicaSet(ReplicaSets.java:115)       io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.determineSnapshotOffsets(MongoDbSnapshotChangeEventSource.java:290)       io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.doExecute(MongoDbSnapshotChangeEventSource.java:99)       io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.doExecute(MongoDbSnapshotChangeEventSource.java:52)       io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:76)       8 more       Caused by: com.mongodb.MongoQueryException: Query failed with error code 303 and error message '\\{$natural: -1}
      
      is not supported' on server ****.ap-northeast-2.docdb.amazonaws.com:27017
            com.mongodb.internal.operation.FindOperation$1.call(FindOperation.java:663)
            com.mongodb.internal.operation.FindOperation$1.call(FindOperation.java:653)
            com.mongodb.internal.operation.OperationHelper.withReadConnectionSource(OperationHelper.java:583)
            com.mongodb.internal.operation.FindOperation.execute(FindOperation.java:653)
            com.mongodb.internal.operation.FindOperation.execute(FindOperation.java:81)
            com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:184)
            com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:200)
            io.debezium.connector.mongodb.MongoDbSnapshotChangeEventSource.lambda$determineSnapshotOffsets$5(MongoDbSnapshotChangeEventSource.java:297)
            io.debezium.connector.mongodb.ConnectionContext$MongoPrimary.execute(ConnectionContext.java:288)
            15 more"
          }],
          "type": "source"
      }
      

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

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

      2.0 Alpha3

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

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

       

      How to reproduce the issue using our tutorial deployment?

      <Your answer>

      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>

      Attachments

        Activity

          People

            ccranfor@redhat.com Chris Cranford
            myoungsun myoungsun park (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: