debezium을 사용하다 아래와 같은 에러가 발생한다..





kafka-connect_1    | [2019-03-20 09:23:35,591] INFO Step 7: rolling back transaction after abort (io.debezium.connector.mysql.SnapshotReader)

kafka-connect_1    | [2019-03-20 09:23:35,603] ERROR Execption while rollback is executed (io.debezium.connector.mysql.SnapshotReader)

kafka-connect_1    | java.sql.SQLNonTransientConnectionException: Can''t call rollback when autocommit=true

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)

kafka-connect_1    | at com.mysql.cj.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:1851)

kafka-connect_1    | at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:672)

kafka-connect_1    | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

kafka-connect_1    | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

kafka-connect_1    | at java.lang.Thread.run(Thread.java:748)

kafka-connect_1    | [2019-03-20 09:23:35,606] INFO Cluster ID: akSFNcLmRsK91EzRzUhD-A (org.apache.kafka.clients.Metadata)

kafka-connect_1    | [2019-03-20 09:23:35,606] ERROR Failed due to error: Aborting snapshot due to error when last running 'UNLOCK TABLES': Can''t call rollback when autocommit=true (io.debezium.connector.mysql.SnapshotReader)

kafka-connect_1    | org.apache.kafka.connect.errors.ConnectException: Can''t call rollback when autocommit=true Error code: 0; SQLSTATE: 08003.

kafka-connect_1    | at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)

kafka-connect_1    | at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:208)

kafka-connect_1    | at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:678)

kafka-connect_1    | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

kafka-connect_1    | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

kafka-connect_1    | at java.lang.Thread.run(Thread.java:748)

kafka-connect_1    | Caused by: java.sql.SQLNonTransientConnectionException: Can''t call rollback when autocommit=true

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)

kafka-connect_1    | at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)

kafka-connect_1    | at com.mysql.cj.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:1851)

kafka-connect_1    | at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:592)

kafka-connect_1    | ... 3 more






kafka-connect_1    | [2019-03-20 09:23:37,375] ERROR WorkerSourceTask{id=kc_debezium_connector_shopping_orders-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask)

kafka-connect_1    | org.apache.kafka.connect.errors.ConnectException: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event '' at 4, the last event read from './mysql-bin.000003' at 194, the last byte read from './mysql-bin.000003' at 194. Error code: 1236; SQLSTATE: HY000.

kafka-connect_1    | at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)

kafka-connect_1    | at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:197)

kafka-connect_1    | at io.debezium.connector.mysql.BinlogReader$ReaderThreadLifecycleListener.onCommunicationFailure(BinlogReader.java:984)

kafka-connect_1    | at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:950)

kafka-connect_1    | at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:580)

kafka-connect_1    | at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:825)

kafka-connect_1    | at java.lang.Thread.run(Thread.java:748)

kafka-connect_1    | Caused by: com.github.shyiko.mysql.binlog.network.ServerException: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event '' at 4, the last event read from './mysql-bin.000003' at 194, the last byte read from './mysql-bin.000003' at 194.

kafka-connect_1    | at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:914)

kafka-connect_1    | ... 3 more

kafka-connect_1    | [2019-03-20 09:23:37,377] ERROR WorkerSourceTask{id=kc_debezium_connector_shopping_orders-0} Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask)





여러 개의 io.debezium.connector.mysql.MySqlConnector를 사용할 때 database.server.id를 동일한 id로 사용할 때 발생한다..





Posted by 김용환 '김용환'