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

When Debezium Mongodb connector encounter authentication or under privilege errors, the connection between debezium and mongodb keeps going up.

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      The work around is to detect this problem early and configure the right credentials of Debezium to begin with. 

      Show
      The work around is to detect this problem early and configure the right credentials of Debezium to begin with. 

      What Debezium connector do you use and what version?

      AMQ Stream 2.4 

      Debezium 2.1.4 

      Mongodb 6.0.6 

      What is the connector configuration?

        1 {
        2     "name": "debezium_2_mongo_connector",
        3     "config": {
        4         "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
        5         "tasks.max": "1",
        6         "mongodb.connection.string": "mongodb://<notadminuser>:<password>@localhost:27017",
        7         "mongodb.members.auto.discover": true,
        8 
        9         "collection.include.list": "testdb.*",
       10 
       11         "topic.prefix": "mongo.dbz_ip_3",
       12         "topic.creation.enable": "true",
       13         "topic.creation.default.replication.factor": 1,
       14         "topic.creation.default.partitions": 1,
       15 
       16         "provide.transaction.metadata": true,
       17 
       18         "key.converter": "org.apache.kafka.connect.json.JsonConverter",
       19         "value.converter": "org.apache.kafka.connect.json.JsonConverter",
       20         "value.converter.schemas.enable": false,
       21         "key.converter.schemas.enable": false,
       22 
       23 
       24         "snapshot.mode": "initial",
       25         "snapshot.max.threads": 1,
       26         "signal.data.collection": "bsatdebeziumtesting.debeziumSignal",
       27 
       28         "connect.max.attempts": 6
       29     }
       30 }
       

      What is the captured database version and mode of deployment?

      > Mongodb Single ReplicaSet

      > Distributed mode

      What behaviour do you expect?

      I expect Debezium will stop after it reaches connect-max-attempts. 

      Even it debezium keeps trying the connections should not keep going up. 

      What behaviour do you see?

      When the user does not have admin privilege, the Debezium will keep reconnecting indefinitely.  

      It did trigger the connect-max-attempts (set to 6), but after 6 times, KafkaConnect restart the connectors and leave it as an infinite loop: 

      [2023-07-06 17:03:52,161] INFO [debezium_2_mongo_connector|task-0] Awaiting end of restart backoff period after a retriable error (io.debezium.connector.common.BaseSourceTask:238)

       

      Also, the connections keeps going up and about 30 minutes, it goes up to 500+ connections using (netstat -anp |grep 27017). 

       

            jcechace@redhat.com Jakub Čecháček
            rhn-support-whui Roger Hui
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: