开发者社区> 问答> 正文

canal服务工作几天后,订阅就失效了,log里总会报这样类似的错误

我必须要把conf里的meta.dat删除之后,重启canal,就能正常订阅了

2020-08-17 23:59:46.496 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234: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 2020-08-17 23:59:46.509 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234: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":"rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000239","position":1662,"serverId":1869133222,"timestamp":1597392046000}} 2020-08-17 23:59:46.516 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000239,position=1662,serverId=1869133222,gtid=,timestamp=1597392046000] cost : 20ms , the next step is binlog dump 2020-08-17 23:59:46.664 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading from client socket java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) [canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) [canal.parse-1.1.4-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] 2020-08-17 23:59:46.664 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 has an error, retrying. caused by java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] 2020-08-17 23:59:46.664 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) at java.lang.Thread.run(Thread.java:748) ]

在这之前,会有很多次链接失败的错误被报出来: 2020-08-17 06:17:03.523 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44. 234:3306 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: connect rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com:3306 failure Caused by: java.io.IOException: connect rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:83) ~[canal.parse.driver-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:89) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:86) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:183) ~[canal.parse-1.1.4-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] Caused by: java.net.UnknownHostException: rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[na:1.8.0_181] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_181] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_181] at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannelPool.open(BioSocketChannelPool.java:18) ~[canal.parse.driver-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:18) ~[canal.parse.driver-1.1.4-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:78) ~[canal.parse.driver-1.1.4-SNAPSHOT.jar:na] ... 4 common frames omitted 2020-08-17 06:17:03.523 [destination = example , address = rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com/39.103.44.234:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[com.alibaba.otter.canal.parse.exception.CanalParse Exception: java.io.IOException: connect rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com:3306 failure Caused by: java.io.IOException: connect rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com:3306 failure at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:83) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.connect(MysqlConnection.java:89) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.preDump(MysqlEventParser.java:86) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:183) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.UnknownHostException: rm-2zetzj900o08o93669o.mysql.rds.aliyuncs.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannelPool.open(BioSocketChannelPool.java:18) at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannelPool.open(SocketChannelPool.java:18) at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:78)

原提问者GitHub用户snowxmas

展开
收起
山海行 2023-04-28 11:45:17 153 0
1 条回答
写回答
取消 提交回答
  • Could not find first log file name in binary log index file

    binlog文件被删除了

    原回答者GitHub用户agapple

    2023-04-28 14:50:19
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载
Kubernetes下日志实时采集、存储与计算实践 立即下载
日志数据采集与分析对接 立即下载