2018-06-28 11:43:52.463 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2018-06-28 11:43:52.470 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2018-06-28 11:43:52.727 [main] WARN o.s.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'connectionCharset' being accessed! Ambiguous write methods found next to actually used [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.nio.charset.Charset)]: [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.lang.String)] 2018-06-28 11:43:52.817 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2018-06-28 11:43:52.817 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2018-06-28 11:43:53.154 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 2018-06-28 11:43:53.598 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2018-06-28 11:43:53.743 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to ... 2018-06-28 11:43:53.743 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2018-06-28 11:43:53.779 [destination = example , address = /172.16.0.2:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"172.16.0.2","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000004","position":15872,"serverId":1,"timestamp":1530090101000}} 2018-06-28 11:43:54.357 [destination = example , address = /172.16.0.2:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta - parse faield : GRANT ALL PRIVILEGES ON . TO 'canal'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*E3619321C1A937C46A0D8BD1DAC39F93B27D4458' com.alibaba.fastsql.sql.parser.ParserException: syntax error, error in :'IDENTIFIED WITH 'mysql_native_password' A', expect BY, actual WITH, pos 58, line 1, column 55, token WITH at com.alibaba.fastsql.sql.parser.SQLParser.printError(SQLParser.java:361) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLParser.accept(SQLParser.java:369) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseGrant(SQLStatementParser.java:1022) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:266) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.SQLUtils.parseStatements(SQLUtils.java:500) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.repository.SchemaRepository.console(SchemaRepository.java:412) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.apply(MemoryTableMeta.java:72) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applyHistoryOnMemory(DatabaseTableMeta.java:382) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:121) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:84) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:173) [canal.parse-1.0.26-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] 2018-06-28 11:43:54.357 [destination = example , address = /172.16.0.2:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta - parse faield : GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON . TO 'canal'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*E3619321C1A937C46A0D8BD1DAC39F93B27D4458' com.alibaba.fastsql.sql.parser.ParserException: syntax error, error in :'IDENTIFIED WITH 'mysql_native_password' A', expect BY, actual WITH, pos 89, line 1, column 86, token WITH at com.alibaba.fastsql.sql.parser.SQLParser.printError(SQLParser.java:361) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLParser.accept(SQLParser.java:369) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseGrant(SQLStatementParser.java:1022) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:266) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.SQLUtils.parseStatements(SQLUtils.java:500) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.fastsql.sql.repository.SchemaRepository.console(SchemaRepository.java:412) ~[fastsql-2.0.0_preview_371.jar:2.0.0_preview_371] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.apply(MemoryTableMeta.java:72) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applyHistoryOnMemory(DatabaseTableMeta.java:382) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:121) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:84) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:173) [canal.parse-1.0.26-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] 2018-06-28 11:43:54.384 [destination = example , address = /172.16.0.2:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - find start position : EntryPosition[included=false,journalName=mysql-bin.000004,position=15872,serverId=1,gtid=,timestamp=1530090101000] 2018-06-28 11:43:54.543 [destination = example , address = /172.16.0.2:3306 , EventParser] WARN c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - dup apply for sql : CREATE TABLE t_comment ( id bigint NOT NULL AUTO_INCREMENT, chapter_id bigint not NULL, comment_member_id bigint not NULL, comment_nickname varchar(32) not NULL, comment_headicon varchar(256) not NULL, is_reply int(11) DEFAULT 0 COMMENT '回复数量', content TEXT NOT NULL COMMENT '内容', agrees int(11) NOT NULL DEFAULT 0 COMMENT '赞同', product_time bigint(20) DEFAULT '0' COMMENT '生产时间', create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT = '评论表' 2018-06-28 11:43:54.577 [destination = example , address = /172.16.0.2:3306 , EventParser] ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading from client socket java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000004, position 16561.; the first event 'mysql-bin.000004' at 15872, the last event read from './mysql-bin.000004' at 16626, the last byte read from './mysql-bin.000004' at 16626. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:105) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:146) [canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:227) [canal.parse-1.0.26-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] 2018-06-28 11:43:54.577 [destination = example , address = /172.16.0.2:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /172.16.0.2:3306 has an error, retrying. caused by java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000004, position 16561.; the first event 'mysql-bin.000004' at 15872, the last event read from './mysql-bin.000004' at 16626, the last byte read from './mysql-bin.000004' at 16626. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:105) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:146) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:227) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] 2018-06-28 11:43:54.580 [destination = example , address = /172.16.0.2:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000004, position 16561.; the first event 'mysql-bin.000004' at 15872, the last event read from './mysql-bin.000004' at 16626, the last byte read from './mysql-bin.000004' at 16626. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:105) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:146) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:227) at java.lang.Thread.run(Thread.java:748) ]
原提问者GitHub用户wangbojing
= Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON, at file ./mysql-bin.000004, position 16561.; the first event 'mysql-bin.000004' at 15872, the last event read from './mysql-bin.000004' at 16626, the last byte read from './mysql-bin.000004' at 16626.
mysql的异常
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。