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

MySQL JDBC connector fails when table definition is not in log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.1
    • None
    • mysql-connector
    • None

      It looks like the MySQL JDBC connector does not properly restart. It fails when it tries to reload its offsets or something.

      The connector worked just fine initially. When stopped and restarted the connector, it gave me a typecasting error:

      [2016-03-02 22:33:52,174] ERROR Task mysql-whitelist-timestamp-source-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerSourceTask:362)
      [2016-03-02 22:33:52,175] ERROR Task is being killed and will not recover until manually restarted: (org.apache.kafka.connect.runtime.WorkerSourceTask:363)
      java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
              at io.debezium.connector.mysql.SourceInfo.setOffset(SourceInfo.java:142)
              at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:183)
              at org.apache.kafka.connect.runtime.WorkerSourceTask$WorkerSourceTaskThread.execute(WorkerSourceTask.java:341)
              at org.apache.kafka.connect.util.ShutdownableThread.run(ShutdownableThread.java:82)
      

      After we fixed the typecasting issue, we got the following error when we restarted the connector:

      [2016-03-03 03:08:34,904] INFO Source task Thread[WorkerSourceTask-mysql-whitelist-timestamp-source-0,5,main] finished initialization and start (org.apache.kafka.connect.runtime.WorkerSourceTask:342)
      [2016-03-03 03:08:35,007] ERROR Task mysql-whitelist-timestamp-source-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerSourceTask:362)
      [2016-03-03 03:08:35,008] ERROR Task is being killed and will not recover until manually restarted: (org.apache.kafka.connect.runtime.WorkerSourceTask:363)
      java.lang.NullPointerException
              at io.debezium.connector.mysql.TableConverters$1.keySchema(TableConverters.java:164)
              at io.debezium.connector.mysql.TableConverters.handleInsert(TableConverters.java:217)
              at io.debezium.connector.mysql.MySqlConnectorTask.poll(MySqlConnectorTask.java:270)
              at org.apache.kafka.connect.runtime.WorkerSourceTask$WorkerSourceTaskThread.execute(WorkerSourceTask.java:353)
              at org.apache.kafka.connect.util.ShutdownableThread.run(ShutdownableThread.java:82)
      

            rhauch Randall Hauch (Inactive)
            criccomini Chris Riccomini (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: