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

Error while deserializing binlog event

    Details

      Description

      I'm having this error when I try to start the connector:

      [2019-03-22 16:52:47,083] ERROR Error while deserializing binlog event at offset {ts_sec=1553284365, file=mysql-bin.000002, pos=131320003, server_id=1, event=5}.
      Use the mysqlbinlog tool to view the problematic event: mysqlbinlog --start-position=131320329 --stop-position=131320416 --verbose mysql-bin.000002 (io.debezium.connector.mysql.BinlogReader:534)
      [2019-03-22 16:52:47,083] ERROR Error while deserializing binlog event at offset {ts_sec=1553284365, file=mysql-bin.000002, pos=131320003, server_id=1, event=5}.
      Use the mysqlbinlog tool to view the problematic event: mysqlbinlog --start-position=131320329 --stop-position=131320416 --verbose mysql-bin.000002 (io.debezium.connector.mysql.BinlogReader:534)
      [2019-03-22 16:52:47,089] ERROR Error during binlog processing. Last offset stored = null, binlog reader near position = mysql-bin.000002/131320329 (io.debezium.connector.mysql.BinlogReader:1020)
      [2019-03-22 16:52:47,089] ERROR Error during binlog processing. Last offset stored = null, binlog reader near position = mysql-bin.000002/131320329 (io.debezium.connector.mysql.BinlogReader:1020)
      [2019-03-22 16:52:47,089] ERROR Failed due to error: Error processing binlog event (io.debezium.connector.mysql.BinlogReader:209)
      org.apache.kafka.connect.errors.ConnectException: com.github.shyiko.mysql.binlog.event.deserialization.EventDataDeserializationException: Failed to deserialize data of EventHeaderV4{timestamp=1553284365000, eventType=TABLE_MAP, serverId=1, headerLength=19, dataLength=68, nextPosition=131320416, flags=0}
              at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)
              at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:208)
              at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:477)
              at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1095)
              at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:943)
              at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:580)
              at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:825)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: com.github.shyiko.mysql.binlog.event.deserialization.EventDataDeserializationException: Failed to deserialize data of EventHeaderV4{timestamp=1553284365000, eventType=TABLE_MAP, serverId=1, headerLength=19, dataLength=68, nextPosition=131320416, flags=0}
              at io.debezium.connector.mysql.BinlogReader.handleServerIncident(BinlogReader.java:544)
              at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:461)
              ... 5 more
      

      I executed the command suggested in the logs:
      mysqlbinlog --start-position=131320329 --stop-position=131320416 --verbose mysql-bin.000002

      /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
      /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
      DELIMITER /*!*/;
      # at 155
      #190322 14:50:23 server id 1  end_log_pos 124 CRC32 0xdc6d29d0  Start: binlog v 4, server v 8.0.13-4 created 190322 14:50:23 at startup
      # Warning: this binlog is either in use or was not closed properly.
      ROLLBACK/*!*/;
      BINLOG '
      XyCVXA8BAAAAeAAAAHwAAAABAAQAOC4wLjEzLTQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      AAAAAAAAAAAAAAAAAABfIJVcEwANAAgAAAAABAAEAAAAYAAEGggAAAAICAgCAAAACgoKKioAEjQA
      CgHQKW3c
      '/*!*/;
      # at 131320329
      #190322 16:52:45 server id 1  end_log_pos 131320416 CRC32 0x826e1b53    Table_map: `dw`.`CAJ_MovimientosCaja` mapped to number 997
      WARNING: The range of printed events ends with a row event or a table map event that does not have the STMT_END_F flag set. This might be because the last statement was not fully written to the log, or because you are using a --stop-position or --stop-datetime that refers to an event in the middle of a statement. The event(s) from the partial statement have not been written to output.
      SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
      DELIMITER ;
      # End of log file
      /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
      /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
      

      This is the DDL of the table:

      CREATE TABLE `CAJ_MovimientosCaja` (
        `Fecha` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
        `IdTM` smallint(6) NOT NULL,
        `Codigo` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `Monto` decimal(65,2) NOT NULL,
        `FechaImpresion` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `EsAnulacion` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
        `Observaciones` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
        `NroUsoCaja` int(11) NOT NULL,
        `IdMovCaja` bigint(20) NOT NULL,
        PRIMARY KEY (`NroUsoCaja`,`IdMovCaja`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpechanec Jiri Pechanec
                Reporter:
                sdvallejo Sergio Vallejo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: