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

MariaDB and BinLogConnector SSH modes incompatible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.7.0.Final
    • mariadb-connector
    • None
    • False
    • None
    • False
    • Moderate

      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?

      MariaDB v2.7.0.Final

      What is the connector configuration?

      {    "connector.class": "io.debezium.connector.mariadb.MariaDbConnector",    "snapshot.locking.mode": "none",    "errors.log.include.messages": "false",    "topic.creation.default.partitions": "1",    "transforms": "unwrap",    "signal.enabled.channels": "kafka",    "transforms.unwrap.drop.tombstones": "true",    "topic.creation.default.replication.factor": "3",    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",    "errors.log.enable": "true",    "key.converter": "io.confluent.connect.avro.AvroConverter",    "snapshot.fetch.size": "8192",    "database.user": "********",    "signal.kafka.bootstrap.servers": "kafka-controller-0.kafka-controller-headless.tenant-internal.svc.cluster.local:9092",    "signal.kafka.topic": "source_6716.streamkap_signal",    "heartbeat.interval.ms": "300000",    "transforms.unwrap.field.name.adjustment.mode": "avro",    "schema.history.internal.kafka.bootstrap.servers": "kafka-controller-0.kafka-controller-headless.tenant-internal.svc.cluster.local:9092",    "topic.creation.enable": "true",    "value.converter.schema.registry.url": "http://cp-schema-registry.tenant-internal.svc.cluster.local:8081",    "transforms.unwrap.add.fields.prefix": "_streamkap_",    "producer.override.max.request.size": "16777216",    "errors.max.retries": "5",    "database.password": "****************",    "name": "source_6716",    "errors.tolerance": "all",    "max.batch.size": "2048",    "snapshot.mode": "no_data",    "connect.timeout.ms": "10000",    "transforms.unwrap.delete.handling.mode": "rewrite",    "max.queue.size": "8192",    "incremental.snapshot.chunk.size": "32768",    "producer.override.batch.size": "16384",    "transforms.unwrap.schema.name.adjustment.mode": "avro",    "schema.history.internal.store.only.captured.databases.ddl": "false",    "schema.history.internal.store.only.captured.tables.ddl": "false",    "topic.prefix": "source_6716",    "binary.handling.mode": "bytes",    "schema.history.internal.kafka.topic": "source_6716.schema_changes",    "value.converter": "io.confluent.connect.avro.AvroConverter",    "database.server.id": "1729525794",    "topic.creation.default.cleanup.policy": "delete",    "read.only": "true",    "snapshot.max.threads": "5",    "transforms.unwrap.add.headers": "op",    "topic.creation.default.retention.ms": "604800000",    "database.port": "3306",    "database.ssl.mode": "disabled",    "database.connectionTimeZone": "SERVER",    "database.hostname": "*******-*******.************.us-west-2.rds.amazonaws.com",    "transforms.unwrap.add.fields": "source.ts_ms,ts_ms",    "table.include.list": "myschema.mytable,streamkap_signal",    "topic.creation.default.remote.storage.enable": "false",    "key.converter.schema.registry.url": "http://cp-schema-registry.tenant-internal.svc.cluster.local:8081"} 

      What is the captured database version and mode of deployment?

      MariaDB on AWS RDS - Engine version 11.4.3

      What behavior do you expect?

      To be able to rely on default SSL mode and/or specify mode(s) supported by the MariaDB driver

      What behavior do you see?

      `preferred` mode is not recognised by the MariaDB driver and the Connector fails to be created:

      [2024-11-05 10:28:04,047] ERROR [pool-3-thread-2] Failed testing connection for jdbc:mariadb://*******-*******.************.us-west-2.rds.amazonaws.com:3306/?useInformationSchema=true&nullCatalogMeansCurrent=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL&connectTimeout=30000 with user '******' (io.debezium.connector.binlog.BinlogConnector)java.sql.SQLException: error parsing url : Wrong argument value 'preferred' for SslMode	at org.mariadb.jdbc.Configuration.parseInternal(Configuration.java:644)	at org.mariadb.jdbc.Configuration.parse(Configuration.java:568)	at org.mariadb.jdbc.Driver.connect(Driver.java:96)	at org.mariadb.jdbc.Driver.connect(Driver.java:27)	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)	at io.debezium.jdbc.JdbcConnection.lambda$patternBasedFactory$0(JdbcConnection.java:194)	at io.debezium.jdbc.JdbcConnection$ConnectionFactoryDecorator.connect(JdbcConnection.java:132)	at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:894)	at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:889)	at io.debezium.jdbc.JdbcConnection.connect(JdbcConnection.java:403)	at io.debezium.connector.binlog.BinlogConnector.validateConnection(BinlogConnector.java:64)	at io.debezium.connector.common.RelationalBaseSourceConnector.validate(RelationalBaseSourceConnector.java:42)	at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:553)	at org.apache.kafka.connect.runtime.AbstractHerder.lambda$validateConnectorConfig$3(AbstractHerder.java:413)	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)	at java.base/java.lang.Thread.run(Thread.java:840)Caused by: java.lang.IllegalArgumentException: Wrong argument value 'preferred' for SslMode	at org.mariadb.jdbc.export.SslMode.from(SslMode.java:47)	at org.mariadb.jdbc.Configuration.<init>(Configuration.java:426)	at org.mariadb.jdbc.Configuration.<init>(Configuration.java:53)	at org.mariadb.jdbc.Configuration$Builder.build(Configuration.java:2891)	at org.mariadb.jdbc.Configuration.parseInternal(Configuration.java:641)	... 19 more

      Taken from https://mariadb.com/docs/server/connect/programming-languages/java/tls/:

      sslMode Enables SSL/TLS in a specific mode. The following values are supported: * disable: Do not use SSL/TLS (default)
      • trust: Only use SSL/TLS for encryption. Do not perform certificate or hostname verification. This mode is not safe for production applications.
      • verify-ca: Use SSL/TLS for encryption and perform certificates verification, but do not perform hostname verification.
      • verify-full: Use SSL/TLS for encryption, certificate verification, and hostname verification.

      This new option replaces the deprecated options: * disableSslHostnameVerification

      • trustServerCertificate
      • useSsl|string|disable|3.0.3|

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

      Untested

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

      Yes

              Unassigned Unassigned
              jonathono Jonathon Ogden
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: