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

Failed to authenticate to the MySQL database after snapshot

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.5.0.Beta1
    • None
    • mysql-connector
    • None

    Description

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      MySQL connector bundled with Debezium server `quay.io/debezium/server:2.4.0.Final`

      What is the connector configuration?

      DebeziumServer resource: 

      topic.prefix: accounts-debezium
      # Config for how DB history is tracked by Debezium
      schema.history.internal: io.debezium.storage.file.history.FileSchemaHistory
      schema.history.internal.file.filename: /debezium/data/dbhistory.dat
      offset.storage.file.filename: /debezium/data/offsets.dat
      table.include.list: migrations
      database.history: io.debezium.relational.history.FileDatabaseHistory
      # DB Conncetion config
      database.hostname: cloudsql-master-instance
      database.user: '${MYSQL_USERNAME}'
      database.password: '${MYSQL_PASSWORD}'
      database.include.list: mydatabase
      snapshot.include.collection.list: mydatabase.*
      # Required, must be unique across all Debezium connectors
      database.server.id: 123456
      driver.verifyServerCertificate: true
      driver.useSSL: true
      driver.requireSSL: true
      driver.clientCertificateKeyStoreUrl: 'file:/debezium/external-configuration/cloudsql/keystore.jks'
      driver.clientCertificateKeyStorePassword: '${JKS_PASSWORD}'
      driver.trustCertificateKeyStoreUrl: 'file:/debezium/external-configuration/cloudsql/truststore.jks'
      driver.trustCertificateKeyStorePassword: '${JKS_PASSWORD}' 

      What is the captured database version and mode of depoyment?

      GCP CloudSQL - MySQL 8.0.26

      What behaviour do you expect?

      Binlog connection to succeed, since the connection to make the snapshot succeeds

      What behaviour do you see?

      Error after snapshot finishes (see attached logs)

      2023-11-10 19:32:28,466 ERROR [io.deb.pip.ErrorHandler] (debezium-mysqlconnector-accounts-debezium-change-event-source-coordinator) Producer failure: io.debezium.DebeziumException: Failed to authenticate to the MySQL database at REDACTED:3306 with user 'debezium' 

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

      Different error with `2.5.0.Alpha1` 

      2023-11-10 20:12:06,931 ERROR [io.deb.ser.ConnectorLifecycle] (pool-8-thread-1) Connector completed: success = 'false', message = 'Unable to instantiate OffsetCommitPolicy class 'org.apache.kafka.connect.storage.FileOffsetBackingStore'', error = 'java.lang.IllegalArgumentException: Call to constructor of class io.debezium.engine.spi.OffsetCommitPolicy$PeriodicCommitOffsetPolicy failed': java.lang.IllegalArgumentException: Call to constructor of class io.debezium.engine.spi.OffsetCommitPolicy$PeriodicCommitOffsetPolicy failed 

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

      See attached file

       

      Additional Info

      I have verfied the account has the correct permissions: 

      +------------------------------------------------------------------------------------------------------+
      | Grants for debezium@%                                                                                |
      +------------------------------------------------------------------------------------------------------+
      | GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO `debezium`@`%` |
      +------------------------------------------------------------------------------------------------------+ 

      Attachments

        Issue Links

          Activity

            People

              vjuranek@redhat.com Vojtech Juranek
              astojda Alex Stojda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: