启动 maxwell :Could not find first log file name in binary log index file

报错如下:

com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
    at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:946) [mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:581) [mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) [mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
13:28:35,452 INFO  BinlogConnectorLifecycleListener - Binlog disconnected.
13:28:35,505 ERROR BinlogConnectorReplicator - Shutting down due to communication errors to Mysql
com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
    at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:946) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:581) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_144]
13:28:35,508 INFO  TaskManager - Stopping 4 tasks
13:28:35,509 ERROR TaskManager - cause: 
com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
    at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:946) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:581) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) ~[mysql-binlog-connector-java-0.20.0.jar:0.20.0]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
 

原因:

Maxwell 在 maxwell 库中维护了 binlog 的位移等信息,由于一些原因譬如 reset master;,导致 maxwell 库中的记录与实际的binlog对不上,这时将报异常,这是可以手动修正binlog位移或者直接清空/删除 maxwell 库重建

解决:

办法一  :删除mysql里面 maxwell 数据库,重新创建

办法二:清空maxwell 数据库 里面positions表

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值