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

Antlr version mismatch breaks MySQLConnector in debezium-server 2.1.3/2.1.4

XMLWordPrintable

    • Important

      Bug report

      In debezium-server 2.1.3.Final and 2.1.4.Final a new Antlr runtime (4.10.1) is included through dependencies that is incompatible with the version specified in the debezium dependencies (4.8). After starting debezium-server, it warns about this:

      ```

      Startup 2.1.2-Final:
      debezium-server_1       | ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.9.2
      debezium-server_1       | ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.9.2

      Startup 2.1.3-Final:
      debezium-server_1       | ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.10.1
      debezium-server_1       | ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.10.1

      Startup 2.1.4-Final:
      debezium-server_1       | ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.10.1
      debezium-server_1       | ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.10.1

      ```

      Apparently 4.9.2 was backwards compatible enough with 4.8 to not crash on 2.1.2.Final, but on with Antlr 4.10.1 on 2.1.3. Final and 2.1.4.Final this results in a crash with `java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).` 

      What is the connector configuration?

      ```

      debezium.sink.type=eventhubs
      debezium.sink.eventhubs.connectionstring=<snipped>
      debezium.sink.eventhubs.hubname=<snipped>

      debezium.source.connector.class=io.debezium.connector.mysql.MySqlConnector
      debezium.source.offset.storage.file.filename=data/offsets.dat
      debezium.source.offset.flush.interval.ms=10000
      debezium.source.database.hostname=<snipped>
      debezium.source.database.port=3306
      debezium.source.database.user=<snipped>
      debezium.source.database.password=<snipped>
      debezium.source.database.server.id=3355

      debezium.source.snapshot.locking.mode=none

      debezium.source.include.schema.changes=true
      debezium.source.topic.prefix=eventlog
      debezium.source.max.batch.size=512

      debezium.source.schema.history.internal=io.debezium.storage.file.history.FileSchemaHistory
      debezium.source.schema.history.internal.file.filename=data/schema-history.dat

      quarkus.log.file.enable=true
      quarkus.log.file.path=logs/debezium-server.log
      quarkus.log.file.rotation.max-file-size=100M
      quarkus.log.file.rotation.max-backup-index=20
      quarkus.log.file.rotation.file-suffix=.yyyy-MM-dd-HH
      quarkus.log.level=TRACE

      ```

      What is the captured database version and mode of depoyment?

      MySQL 5.7, tested both on a clean MySQL docker image and with Azure MySQL for Flexible Server.

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

      2.2.0-CR0 is working correcttly.

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

      Full DEBUG log from start to finish.

      debezium-server.log

       

              Unassigned Unassigned
              sebastiaan@castoredc.com Sebastiaan Knijnenburg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: