Could not find first log file name in binary log index file
ansonhorse opened this issue · comments
Madou commented
看到有好几个类似的issue,我的数据库是RDS,有点特别,所以在此做一下记录。
看日志是这样的:
[2020/08/24 21:04:21] [error] binlogsyncer.go:657 io.ReadFull(header) failed. err EOF: connection was bad
[2020/08/24 21:04:22] [info] binlogsyncer.go:588 begin to re-sync from (mysql-bin.005100, 516815543)
[2020/08/24 21:04:22] [error] binlogsyncer.go:686 retry sync err: dial tcp 172.31.18.8:3306: connect: connection refused, wait 1s and retry again
[2020/08/24 21:04:23] [info] binlogsyncer.go:588 begin to re-sync from (mysql-bin.005100, 516815543)
[2020/08/24 21:04:23] [error] binlogsyncer.go:686 retry sync err: dial tcp 172.31.18.8:3306: connect: connection refused, wait 1s and retry again
[2020/08/24 21:04:24] [info] binlogsyncer.go:588 begin to re-sync from (mysql-bin.005100, 516815543)
[2020/08/24 21:04:24] [error] binlogsyncer.go:686 retry sync err: dial tcp 172.31.18.8:3306: connect: connection refused, wait 1s and retry again
[2020/08/24 21:04:25] [info] binlogsyncer.go:588 begin to re-sync from (mysql-bin.005100, 516815543)
[2020/08/24 21:04:25] [error] binlogsyncer.go:844 kill connection 15840770 error ERROR 1094 (HY000): Unknown thread id: 15840770
[2020/08/24 21:04:25] [info] binlogsyncer.go:850 kill last connection id 15840770
[2020/08/24 21:04:25] [error] binlogstreamer.go:77 close sync with err: ERROR 1236 (HY000): Could not find first log file name in binary log index file
[2020/08/24 21:04:25] [error] canal.go:232 canal start sync binlog err: ERROR 1236 (HY000): Could not find first log file name in binary log index file
[2020/08/24 21:04:25] [error] river.go:297 start canal err ERROR 1236 (HY000): Could not find first log file name in binary log index file
然后想起之前阿里云发过这样消息通知:
时间:8/23
【阿里云】尊敬的***:您的云数据库RDS的1个实例将计划最早于2020-08-24 21时开始发起小版本升级操作,以确保实例提供更出色的性能和稳定性。建议设置自动重连机制以避免切换影响。若需调整切换时间,请登录控制台待处理事件查看和处理。
时间:8/24 21:05
【阿里云】尊敬的***:您的云数据库RDS实例:rm-xxx(名称:rm-xxx)出现异常,高可用系统已触发切换,确保实例稳定运行。请检查程序连接是否正常,建议设置自动重连机制以避免切换影响。
可以看后一条信息的时间,跟日志基本对应上了。所以我怀疑是RDS做了这个切换
后,binlog文件被删除了(或者是上传到OSS了)。
Madou commented
这个不算是一个真正的issue,可以说是一个记录分享吧,我先关闭。不过如果从阿里云方面了解到更多信息,会继续贴出来的。
Madou commented