-
Bug
-
Resolution: Unresolved
-
Major
-
1.9.4.Final
-
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":
}
>
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.>