simonChen0317 opened a new issue, #4228:
URL: https://github.com/apache/incubator-seatunnel/issues/4228

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   io.debezium.DebeziumException: Cannot replicate anonymous transaction when 
@@GLOBAL.GTID_MODE = ON, at file 
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   env {
     execution.parallelism = 1
     job.mode = "STREAMING"
   }
   
   source {
       MySQL-CDC {
         result_table_name = "fake"
         parallelism = 1
         hostname = "192.168.252.16"
         port = 3306
         username = ""
         startup.mode = "earliest"
         password = ""
         database-name = "data_acquisition"
         table-name = "user_list"
         base-url = "jdbc:mysql://192.168.252.16:3306"
       }
   }
   
   transform {
   
   }
   
   sink {
       console {
       }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   ./bin/seatunnel.sh --config ../seatunnel_task1/mysql-console.template  -e 
local
   ```
   
   
   ### Error Exception
   
   ```log
   2023-02-27 10:52:27,235 ERROR io.debezium.pipeline.ErrorHandler - Producer 
failure
   io.debezium.DebeziumException: Cannot replicate anonymous transaction when 
@@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000001, position 154.; the first 
event 'mysql-bin.000001' at 4, the last event read from './mysql-bin.000001' at 
219, the last byte read from './mysql-bin.000001' at 219. Error code: 1236; 
SQLSTATE: HY000.
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1154)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
 [connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
 [connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 [connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]
   Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot 
replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file 
./mysql-bin.000001, position 154.; the first event 'mysql-bin.000001' at 4, the 
last event read from './mysql-bin.000001' at 219, the last byte read from 
'./mysql-bin.000001' at 219.
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 3 more
   2023-02-27 10:52:27,238 INFO  
io.debezium.connector.mysql.MySqlStreamingChangeEventSource - Stopped reading 
binlog after 0 events, no new offset was recorded
   2023-02-27 10:52:27,672 ERROR 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcherManager
 - Received uncaught exception.
   java.lang.RuntimeException: SplitFetcher thread 0 received unexpected 
exception while polling the records
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:81)
 [connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_301]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
[?:1.8.0_301]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_301]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_301]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]
   Caused by: 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:42) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   Caused by: io.debezium.DebeziumException: Cannot replicate anonymous 
transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000001, position 
154.; the first event 'mysql-bin.000001' at 4, the last event read from 
'./mysql-bin.000001' at 219, the last byte read from './mysql-bin.000001' at 
219. Error code: 1236; SQLSTATE: HY000.
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1154)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot 
replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file 
./mysql-bin.000001, position 154.; the first event 'mysql-bin.000001' at 4, the 
last event read from './mysql-bin.000001' at 219, the last byte read from 
'./mysql-bin.000001' at 219.
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   2023-02-27 10:52:27,677 INFO  
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceSplitReader
 - Close current fetcher 
org.apache.seatunnel.connectors.cdc.base.source.reader.external.IncrementalSourceStreamFetcher
   2023-02-27 10:52:27,677 WARN  
org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 
[seatunnel_default_cluster-643815] [5.1] Exception in 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask@ce859b
   java.lang.RuntimeException: One or more fetchers have encountered exception
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcherManager.checkErrors(SplitFetcherManager.java:147)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.getNextFetch(SourceReaderBase.java:158)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:91)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceReader.pollNext(IncrementalSourceReader.java:94)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.engine.server.task.flow.SourceFlowLifeCycle.collect(SourceFlowLifeCycle.java:136)
 ~[seatunnel-starter.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.collect(SourceSeaTunnelTask.java:84)
 ~[seatunnel-starter.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:161)
 ~[seatunnel-starter.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.call(SourceSeaTunnelTask.java:89)
 ~[seatunnel-starter.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:488)
 [seatunnel-starter.jar:2.3.1-SNAPSHOT]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_301]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
[?:1.8.0_301]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_301]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_301]
           at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]
   Caused by: java.lang.RuntimeException: SplitFetcher thread 0 received 
unexpected exception while polling the records
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:81)
 ~[connector-console-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 5 more
   Caused by: 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:42) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   Caused by: io.debezium.DebeziumException: Cannot replicate anonymous 
transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000001, position 
154.; the first event 'mysql-bin.000001' at 4, the last event read from 
'./mysql-bin.000001' at 219, the last byte read from './mysql-bin.000001' at 
219. Error code: 1236; SQLSTATE: HY000.
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1154)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot 
replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file 
./mysql-bin.000001, position 154.; the first event 'mysql-bin.000001' at 4, the 
last event read from './mysql-bin.000001' at 219, the last byte read from 
'./mysql-bin.000001' at 219.
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)
 ~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) 
~[connector-cdc-mysql-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]
           ... 1 more
   2023-02-27 10:52:27,678 INFO  
org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 
[seatunnel_default_cluster-643815] [5.1] taskDone, taskId = 40000, taskGroup = 
TaskGroupLocation{jobId=682419700243628033, pipelineId=1, taskGroupId=30000}
   2023-02-27 10:52:27,678 WARN  
org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 
[seatunnel_default_cluster-643815] [5.1] Interrupted task 50000 - 
org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask@134a21ae
   2023-02-27 10:52:27,678 INFO  
org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 
[seatunnel_default_cluster-643815] [5.1] taskDone, taskId = 50000, taskGroup = 
TaskGroupLocation{jobId=682419700243628033, pipelineId=1, taskGroupId=30000}
   2023-02-27 10:52:27,679 INFO  
org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 
[seatunnel_default_cluster-643815] [5.1] Task 
TaskGroupLocation{jobId=682419700243628033, pipelineId=1, taskGroupId=30000} 
complete with state FAILED
   2023-02-27 10:52:27,681 INFO  
org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex - Job SeaTunnel 
(682419700243628033), Pipeline: [(1/1)], task: [MySQL-CDC-SourceTask (1/1)] 
turn to end state FAILED.
   2023-02-27 10:52:27,681 ERROR 
org.apache.seatunnel.engine.server.dag.physical.PhysicalVertex - Job SeaTunnel 
(682419700243628033), Pipeline: [(1/1)], task: [MySQL-CDC-SourceTask (1/1)] end 
with state FAILED and Exception: java.lang.RuntimeException: One or more 
fetchers have encountered exception
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcherManager.checkErrors(SplitFetcherManager.java:147)
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.getNextFetch(SourceReaderBase.java:158)
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:91)
           at 
org.apache.seatunnel.connectors.cdc.base.source.reader.IncrementalSourceReader.pollNext(IncrementalSourceReader.java:94)
           at 
org.apache.seatunnel.engine.server.task.flow.SourceFlowLifeCycle.collect(SourceFlowLifeCycle.java:136)
           at 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.collect(SourceSeaTunnelTask.java:84)
           at 
org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:161)
           at 
org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.call(SourceSeaTunnelTask.java:89)
           at 
org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:488)
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)
   Caused by: java.lang.RuntimeException: SplitFetcher thread 0 received 
unexpected exception while polling the records
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
           at 
org.apache.seatunnel.connectors.seatunnel.common.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:81)
           ... 5 more
   Caused by: 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:42)
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1199)
           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)
           ... 1 more
   Caused by: io.debezium.DebeziumException: Cannot replicate anonymous 
transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000001, position 
154.; the first event 'mysql-bin.000001' at 4, the last event read from 
'./mysql-bin.000001' at 219, the last byte read from './mysql-bin.000001' at 
219. Error code: 1236; SQLSTATE: HY000.
           at 
io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1154)
           ... 5 more
   Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Cannot 
replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file 
./mysql-bin.000001, position 154.; the first event 'mysql-bin.000001' at 4, the 
last event read from './mysql-bin.000001' at 219, the last byte read from 
'./mysql-bin.000001' at 219.
           at 
com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)
           ... 3 more
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to