canal常见错误处理

1.2.3 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

找到对应的binlog信息更改一致即可, 或者删除这个meta.dat也可以.

"journalName":"mysql-bin.000001","position":43581207,"



posted @ 2020-06-29 17:18  *乐途*  阅读(1656)  评论(1)    收藏  举报