10.11.2-MariaDB canal1.1.7 开启GTID解析失败

oknrviil  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(43)
canal版本: canal.deployer-1.1.7
-----------------------
canal.instance.gtidon=true
MariaDB 版本:10.11.2-MariaDB-log
-----------------------
binlog配置如下:
-----------------------
binlog_format	ROW
log_bin	ON
log_bin_basename	D:\Program Files\MariaDB 10.11\data\master-bin
log_bin_compress	OFF
log_bin_compress_min_len	256
log_bin_index	D:\Program Files\MariaDB 10.11\data\master-bin.index
log_bin_trust_function_creators	OFF
sql_log_bin	ON

启动日志

example.log

2023-03-24 10:18:10.585 [main] INFO  c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 
2023-03-24 10:18:10.594 [main] WARN  c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$
2023-03-24 10:18:10.594 [main] WARN  c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : 
2023-03-24 10:18:10.601 [main] INFO  c.a.otter.canal.instance.core.AbstractCanalInstance - start successful....
2023-03-24 10:18:10.649 [destination = example , address = localhost/127.0.0.1:3306 , EventParser] WARN  c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> begin to find start position, it will be long time for reset or first position
2023-03-24 10:18:10.649 [destination = example , address = localhost/127.0.0.1:3306 , EventParser] WARN  c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status
2023-03-24 10:18:10.664 [destination = example , address = localhost/127.0.0.1:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address localhost/127.0.0.1:3306 has an error, retrying. caused by 
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGtid.<init>(MariaGtid.java:27) ~[canal.parse.driver-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGtid.parse(MariaGtid.java:32) ~[canal.parse.driver-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGTIDSet.update(MariaGTIDSet.java:26) ~[canal.parse.driver-1.1.7-SNAPSHOT.jar:na]
	at com.taobao.tddl.dbsync.binlog.LogDecoder.decode(LogDecoder.java:417) ~[canal.parse.dbsync-1.1.7-SNAPSHOT.jar:na]
	at com.taobao.tddl.dbsync.binlog.LogDecoder.decode(LogDecoder.java:80) ~[canal.parse.dbsync-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:153) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:767) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:384) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:439) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:358) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:191) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
2023-03-24 10:18:10.665 [destination = example , address = localhost/127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGtid.<init>(MariaGtid.java:27)
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGtid.parse(MariaGtid.java:32)
	at com.alibaba.otter.canal.parse.driver.mysql.packets.MariaGTIDSet.update(MariaGTIDSet.java:26)
	at com.taobao.tddl.dbsync.binlog.LogDecoder.decode(LogDecoder.java:417)
	at com.taobao.tddl.dbsync.binlog.LogDecoder.decode(LogDecoder.java:80)
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:153)
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:767)
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:384)
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:439)
	at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:358)
	at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:191)
	at java.base/java.lang.Thread.run(Thread.java:829)
k7fdbhmy

k7fdbhmy1#

需要提供下对应的数据文件binlog

vnjpjtjt

vnjpjtjt3#

相同的错误

bin-log 设置:

MariaDB [test_db]> show global variables like 'binlog_%';
+-----------------------------------------+---------+
| Variable_name                           | Value   |
+-----------------------------------------+---------+
| binlog_alter_two_phase                  | OFF     |
| binlog_annotate_row_events              | ON      |
| binlog_cache_size                       | 32768   |
| binlog_checksum                         | CRC32   |
| binlog_commit_wait_count                | 0       |
| binlog_commit_wait_usec                 | 100000  |
| binlog_direct_non_transactional_updates | OFF     |
| binlog_expire_logs_seconds              | 864000  |
| binlog_file_cache_size                  | 16384   |
| binlog_format                           | ROW     |
| binlog_optimize_thread_scheduling       | ON      |
| binlog_row_image                        | FULL    |
| binlog_row_metadata                     | MINIMAL |
| binlog_stmt_cache_size                  | 32768   |
+-----------------------------------------+---------+

bin log:

mysql-bin.zip

不过我用 flush logs; 刷了一个新的 binlog 文件之后就没有这个报错了 emmmm
仅供参考

相关问题