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

Cannot replicate GTID-transaction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.2-backlog
    • 1.9.4.Final
    • mysql-connector
    • None
    • False
    • None
    • False

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
      at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50)
      at io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1234)
      at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
      at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
      at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: io.debezium.DebeziumException: Cannot replicate GTID-transaction when @@GLOBAL.GTID_MODE = OFF, at file /rdsdbdata/log/binlog/mysql-bin-changelog.222981, position 157.; the first event 'mysql-bin-changelog.222979' at 2920703, the last event read from '/rdsdbdata/log/binlog/mysql-bin-changelog.222981' at 236, the last byte read from '/rdsdbdata/log/binlog/mysql-bin-changelog.222981' at 236. Error code: 1236; SQLSTATE: HY000.
      at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1189)
      ... 5 more
      Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot replicate GTID-transaction when @@GLOBAL.GTID_MODE = OFF, at file /rdsdbdata/log/binlog/mysql-bin-changelog.222981, position 157.; the first event 'mysql-bin-changelog.222979' at 2920703, the last event read from '/rdsdbdata/log/binlog/mysql-bin-changelog.222981' at 236, the last byte read from '/rdsdbdata/log/binlog/mysql-bin-changelog.222981' at 236.
      at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)
      ... 3 more

       

      Scenario where this error occurs:
      Database version upgrade from 5.7 to mysql8,
      Before the upgrade, it was OFF_PERMISSIVE. During the upgrade process, it changes to ON for a short time. During the upgrade process, 4 GTIDs were generated. After the upgrade is complete, change it back to OFF

       

      Provide the offset information before and after the upgrade, as follows:

      Before upgrade:
      ConsumerRecord(topic='qcloud-debezium-offset', partition=23, offset=2593464, timestamp=1663608148496, timestamp_type=0, key=b'["mysql-api_prod-dd_ods_debug_canal_prod_1h-connector",\{"server":"debezium-prod-dd_ods_debug_canal_prod_1h"}]', value=b'{"transaction_id":null,"ts_sec":1663608140,"file":"mysql-bin-changelog.222979","pos":2920703,"row":1,"server_id":485724519,"event":2}', headers=[], checksum=None, serialized_key_size=109, serialized_value_size=133, serialized_header_size=-1)

      after upgrade:
      ConsumerRecord(topic='prod3-qcloud-debezium-offset', partition=9, offset=406, timestamp=1663645084776, timestamp_type=0, key=b'["mysql-api_prod-dd_ods_debug_canal_prod_1h-connector",\{"server":"debezium-prod-dd_ods_debug_canal_prod_1h"}]', value=b'{"transaction_id":null,"ts_sec":1663645084,"file":"mysql-bin-changelog.223114","pos":4638347,"gtids":"066e78e1-daed-11ea-92f0-0675ee4ec5f8:1-4","row":1,"server_id":485724519,"event":2}', headers=[], checksum=None, serialized_key_size=109, serialized_value_size=184, serialized_header_size=-1)

      What Debezium connector do you use and what version?

      <mysql 1.9.4>

      What is the connector configuration?

      <

      {
      "name": "mysql-api_prod-dd_ods_debug_canal_prod_1h-connector",
      "config":

      { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "task.max": "1", "database.hostname": "ro-01.amazonaws.com.cn", "database.port": "3306", "database.dbname": "api_prod", "database.user": "pulse_canal_prod", "database.password": "*********", "database.server.id": "266", "database.server.name": "debezium-prod-dd_ods_debug_canal_prod_1h", "database.include.list": "api_prod", "table.include.list": "api_prod.app_info,api_prod.app_messages,api_prod.app_users,api_prod.appeal_tag_question,api_prod.cache,api_prod.chat,api_prod.clients,api_prod.comment_tip_user,api_prod.comments,api_prod.customers,api_prod.es_six_drive,api_prod.failed_jobs,api_prod.feeds,api_prod.front_error_log,api_prod.good_ideas,api_prod.intent_question,api_prod.intent_question_likes,api_prod.intent_similar,api_prod.intent_similar_question,api_prod.intents,api_prod.jobs,api_prod.locks,api_prod.mail_log,api_prod.message_center,api_prod.message_user,api_prod.messages,api_prod.migrations,api_prod.module,api_prod.nomi_messages,api_prod.operate_logs,api_prod.operating_reports,api_prod.pinpoint_logs,api_prod.qualities,api_prod.quality_question,api_prod.questions,api_prod.relation_groups,api_prod.request_logs,api_prod.role_module,api_prod.role_user,api_prod.roles,api_prod.search_histories,api_prod.tag_question,api_prod.tag_ticket,api_prod.tag_user,api_prod.tags,api_prod.ticket_appeal_tag,api_prod.ticket_comment,api_prod.ticket_email,api_prod.ticket_export,api_prod.ticket_filter_rule,api_prod.ticket_match_rule,api_prod.ticket_merge_tickets,api_prod.ticket_operate_logs,api_prod.tickets,api_prod.toolbar_question,api_prod.toolbars,api_prod.url_log,api_prod.user_action_statistics,api_prod.user_browse_questions,api_prod.user_customers,api_prod.user_export,api_prod.user_feedback_logs,api_prod.user_join_questions,api_prod.user_question,api_prod.user_question_mark,api_prod.user_question_watch,api_prod.user_settings,api_prod.user_ticket,api_prod.user_ticket_watch,api_prod.users", "database.history.kafka.bootstrap.servers": "kafka-001:9092,kafka-002:9092,kafka-003:9092", "database.history.kafka.topic": "history-debezium-api_prod-dd_ods_debug_canal_prod_1h", "database.history.producer.sasl.mechanism": "PLAIN", "database.history.producer.security.protocol": "SASL_PLAINTEXT", "database.history.producer.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"debezium\" password=\"***********\";", "database.history.consumer.sasl.mechanism": "PLAIN", "database.history.consumer.security.protocol": "SASL_PLAINTEXT", "database.history.consumer.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"debezium\" password=\"********\";", "include.schema.changes": "true", "include.query": "true", "snapshot.locking.mode": "none", "snapshot.mode": "schema_only", "topic.creation.default.replication.factor": "3", "topic.creation.default.partitions": "3", "topic.creation.default.compression.type": "lz4", "bigint.unsigned.handling.mode": "precise", "database.history.store.only.captured.tables.ddl": "false", "database.history.skip.unparseable.ddl": "true", "inconsistent.schema.handling.mode": "warn", "database.history.kafka.recovery.poll.interval.ms": "600000", "database.history.kafka.recovery.attempts": "3", "boolean.type": "io.debezium.connector.mysql.converters.TinyIntOneToBooleanConverter", "converters": "boolean" }

      }

      >

      What is the captured database version and mode of depoyment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      <upgrade from 5.7 to mysql8>

      What behaviour do you expect?

      <Subsequent dba has a large number of database upgrade plans. I hope that when a similar scenario occurs, the debezium connector can run normally.>

       

              Unassigned Unassigned
              fy18759 fei yang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: