开发者社区> 问答> 正文

为何卡在the next step is binlog dump

2019-01-16 10:34:29.249 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-01-16 10:34:29.249 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [im_test/instance.properties] 2019-01-16 10:34:29.296 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2019-01-16 10:34:29.297 [canal-instance-scan-0] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [im_test/instance.properties] 2019-01-16 10:34:29.323 [canal-instance-scan-0] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 2019-01-16 10:34:29.345 [canal-instance-scan-0] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-im_test 2019-01-16 10:34:29.369 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2019-01-16 10:34:29.386 [destination = im_test , address = /10.88.26.36: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 2019-01-16 10:34:29.386 [destination = im_test , address = /10.88.26.36:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"scm-mysql-testdb01.baozun.com","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000517","position":978807988,"serverId":200,"timestamp":1547606062000}} 2019-01-16 10:34:29.395 [destination = im_test , address = /10.88.26.36:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000517,position=978807988,serverId=200,gtid=,timestamp=1547606062000] cost : 8ms , the next step is binlog dump

原提问者GitHub用户ZSH9053

展开
收起
古拉古拉 2023-05-08 15:03:13 459 0
2 条回答
写回答
取消 提交回答
  • 处于正常的binlog处理阶段,这时候需要启动client了

    原回答者GitHub用户agapple

    2023-05-09 18:06:53
    赞同 展开评论 打赏
  • 根据日志提示,Canal的解析器已经找到了开始解析的位置(EntryPosition),下一步是进行binlog dump操作。

    binlog dump是Canal作为一个MySQL主从复制中的从端实现数据同步的核心操作。它的作用是连接MySQL数据库(作为从端),从指定的binlog文件的指定位置开始接收binlog事件,并将其转换为Canal内部的数据模型进行处理。

    如果Canal在进行binlog dump的过程中出现问题,可能会导致数据同步停滞或者出现异常。常见的binlog dump问题包括:

    1. 网络连接问题:Canal与MySQL之间的网络连接出现问题,导致连接断开或者延迟,从而无法进行binlog dump。

    2. 服务器配置问题:Canal所在的服务器配置不足,无法满足高并发的binlog dump请求,导致阻塞或者超时等问题。

    3. MySQL配置问题:MySQL的配置(例如max_allowed_packet)无法支持binlog dump操作,导致操作失败或者出现异常。

    4. 其他原因:例如版本兼容性、权限问题等。

    针对这些问题,可以通过以下方法进行排查和解决:

    1. 检查Canal、MySQL、中间件等的日志,查看是否有异常信息或者报错信息,定位问题所在。

    2. 检查Canal和MySQL之间的网络连接是否正常,例如调整防火墙规则、增加带宽等。

    3. 检查Canal和MySQL所在的服务器的配置是否符合要求,例如调整硬件资源、优化网络配置等。

    4. 调整Canal和MySQL的相关配置参数,例如调整max_allowed_packet参数。

    5. 升级Canal或MySQL的版本,解决版本兼容性问题。

    6. 检查Canal和MySQL的权限设置是否正确,确保Canal有足够的权限进行binlog dump操作。

    2023-05-08 15:12:00
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PolarDB-X 2.0 全局 Binlog 与备份恢复能 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载