开发者社区> 问答> 正文

canal client拉取binlog,server端报错java.nio.channels.Cl

2018-01-26 14:04:56.245 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:2461.1record/sec can al speed:6273.7record/sec 2018-01-26 14:05:06.245 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:3666.6record/sec can al speed:8312.6record/sec 2018-01-26 14:05:16.246 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:4077.8record/sec can al speed:12065.4record/sec 2018-01-26 14:05:26.246 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:2859.6record/sec can al speed:6839.5record/sec 26 2018-01-26 14:05:36.246 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:329.2record/sec cana l speed:920.5record/sec 27 2018-01-26 14:05:46.246 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:149.3record/sec cana l speed:419.7record/sec 2018-01-26 14:05:56.247 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:76.4record/sec canal speed:212.2record/sec 2018-01-26 14:06:06.247 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:23.6record/sec canal speed:68.9record/sec 2018-01-26 14:06:16.248 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:58.0record/sec canal speed:165.8record/sec 2018-01-26 14:06:26.248 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:38.7record/sec canal speed:108.9record/sec 2018-01-26 14:06:36.248 INFO 121070 --- [ Thread-4] com.gome.canalmq.service.MonitorService : lmis speed:29.9record/sec canal speed:86.6record/sec 2018-01-26 14:05:22.693 [destination = lmis65 , address = /10.128.35.65:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address 10.128.35.65/10.128.35.65:3306 has an error, retrying. caused by java.nio.channels.ClosedByInterruptException: null at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannel.read(SocketChannel.java:49) ~[canal.parse.driver-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch0(DirectLogFetcher.java:151) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:77) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:137) ~[canal.parse-1.0.25.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:220) ~[canal.parse-1.0.25.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] 2018-01-26 14:05:22.697 [destination = lmis65 , address = /10.128.35.65:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:lmis65[java.nio.channels.ClosedByInterruptException at com.alibaba.otter.canal.parse.driver.mysql.socket.SocketChannel.read(SocketChannel.java:49) at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch0(DirectLogFetcher.java:151) at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:77) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:137) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:220) at java.lang.Thread.run(Thread.java:745) ] 2018-01-26 14:05:41.309 [destination = lmis65 , address = /10.128.35.65:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"10.128.35.65","port":3306}},"postion":{"included":false,"journalName":"mysql-bin.003759","position":891656455,"serverId":1,"timestamp":1516929456000}}

原提问者GitHub用户hutao1990

展开
收起
绿子直子 2023-05-09 10:54:25 112 0
3 条回答
写回答
取消 提交回答
  • 建议升级到26版本,解决了超时时间过短以及链接mysql切回bio的模式

    原回答者GitHub用户agapple

    2023-05-10 10:19:11
    赞同 展开评论 打赏
  • 云端行者觅知音, 技术前沿我独行。 前言探索无边界, 阿里风光引我情。

    java.nio.channels.ClosedByInterruptException这段错误信息可以看下。这可能是因为客户端与服务器之间的连接已经关闭,或者客户端没有正确设置超时时间。可以尝试增加超时时间,或更改连接设置以更好地适应客户端的需求。也有可能是因为服务器端没有正确设置地址,或者服务器端已经停止运行。可以尝试重新启动服务器,或者更改服务器端的地址和端口号。

    2023-05-09 12:03:55
    赞同 展开评论 打赏
  • 随心分享,欢迎友善交流讨论:)

    这可能是由于Canal客户端和服务端之间的网络连接出现了问题,导致数据传输失败引起的。具体原因可能是网络不稳定、网络带宽不够、防火墙或路由器配置不正确等问题导致。解决此问题的方法如下:

    检查Canal客户端和服务端之间的网络连接是否正常,防火墙或路由器是否正确配置。

    检查Canal客户端和服务端之间的网络带宽是否足够,如果网络带宽不够,则可以尝试使用更高速的网络连接或增加网络带宽。

    检查Canal客户端和服务端之间的数据传输协议是否正确,例如TCP或UDP协议是否正确设置。

    尝试增加Canal客户端的重试次数或重试间隔来缓解网络传输失败的问题。

    如果以上方法都无法解决问题,可以尝试使用其他网络连接或协议,或更新Canal客户端和服务端的版本来获得更好的网络连接性能。

    2023-05-09 12:03:54
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
基于Java容器的多应用部署技术实践 立即下载
从《阿里巴巴Java开发手册》编写推广谈技术成长 立即下载
如何通过 Serverless 提高 Java 微服务治理效 立即下载