canal常见错误处理
错误信息如下:
2019-06-17 19:35:20.918 [New I/O server worker #1-2] ERROR c.a.otter.canal.server.netty.handler.SessionHandler - something goes wrong with channel:[id: 0x7f2e9be3, /192.168.200.56:52225 => /192.168.200.128:11111], exception=java.io.IOException: Connection reset by peer
解决办法:
进入mysql中执行下面语句查看binlog所在位置
mysql> show master status;
显示如下:
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000001 | 120 | | | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
如果file中binlog文件不为 mysql-bin.000001 可以重置mysql
mysql> reset master;
查看canal配置文件
vim usr/local/canal/conf/example/meta.dat
"journalName":"mysql-bin.000001","position":43581207,"

浙公网安备 33010602011771号