开发者社区> 问答> 正文

canal Broken pipe, 看代码好像是去更新MySQL中的meta_snapshot,

canal 日志

2018-06-03 21:24:30.826 [[scheduler-table-meta-snapshot]] ERROR c.a.o.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta - scheudle applySnapshotToDB faield com.alibaba.otter.canal.parse.exception.CanalParseException: java.net.SocketException: Broken pipe (Write failed) Caused by: java.net.SocketException: Broken pipe (Write failed) at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.8.0_171] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[na:1.8.0_171] at java.net.SocketOutputStream.write(SocketOutputStream.java:143) ~[na:1.8.0_171] at com.alibaba.otter.canal.parse.driver.mysql.socket.BioSocketChannel.write(BioSocketChannel.java:35) ~[canal.parse.driver-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.utils.PacketManager.writeBody0(PacketManager.java:42) ~[canal.parse.driver-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.utils.PacketManager.writeBody(PacketManager.java:35) ~[canal.parse.driver-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.query(MysqlQueryExecutor.java:55) ~[canal.parse.driver-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.query(MysqlConnection.java:94) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.compareTableMetaDbAndMemory(DatabaseTableMeta.java:296) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applySnapshotToDB(DatabaseTableMeta.java:251) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.access$100(DatabaseTableMeta.java:45) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta$2.run(DatabaseTableMeta.java:84) ~[canal.parse-1.0.26-SNAPSHOT.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_171] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_171] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_171] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]

##canal-client

mory=0.024801254, InstallDirSize=11.233233, LastUpdatetime=2018-05-31 17:01:28.0}], old=[{LastUpdatetime=2018-05-31 17:01:23.0}]} 10:11:45.401 [pool-6-thread-1] INFO com.tops001.foundation.canal.connector.CanalLog4JConnector - {"data":[{"Id":1,"NodeName":"新增节点","NodeCreateTime":1484977299000,"NodeIP":"WIN-8RG5KGC1JNM","NodeLastUpdatetime":1527757293000,"IfCheckState":false}],"database":"tops_bops_task","old":[{"NodeLastUpdatetime":1527757288000}],"sql":"","table":"task_node","ts":1528078305401,"type":"UPDATE"} 10:11:45.401 [pool-6-thread-1] DEBUG com.tops001.foundation.canal.connector.es.syn.ElasticsearchSynService - Dml{database='tops_bops_task', table='task_node', type='UPDATE', ts=1528078305401, sql='', data=[{Id=1, NodeName=新增节点, NodeCreateTime=2017-01-21 13:41:39.0, NodeIP=WIN-8RG5KGC1JNM, NodeLastUpdatetime=2018-05-31 17:01:33.0, IfCheckState=false}], old=[{NodeLastUpdatetime=2018-05-31 17:01:28.0}]} 10:11:45.402 [Thread-12] WARN com.alibaba.otter.canal.client.impl.ClusterCanalConnector - something goes wrong when getWithoutAck data from server:null com.alibaba.otter.canal.protocol.exception.CanalClientException: java.io.IOException: end of stream when reading header at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.getWithoutAck(SimpleCanalConnector.java:291) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.getWithoutAck(SimpleCanalConnector.java:264) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.ClusterCanalConnector.getWithoutAck(ClusterCanalConnector.java:182) ~[canal.client-1.0.26.4.jar!/:?] at com.tops001.foundation.canal.service.CanalWorker.process(CanalWorker.java:120) ~[classes!/:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] Caused by: java.io.IOException: end of stream when reading header at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.read(SimpleCanalConnector.java:396) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:384) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.readNextPacket(SimpleCanalConnector.java:368) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.receiveMessages(SimpleCanalConnector.java:296) ~[canal.client-1.0.26.4.jar!/:?] at com.alibaba.otter.canal.client.impl.SimpleCanalConnector.getWithoutAck(SimpleCanalConnector.java:289) ~[canal.client-1.0.26.4.jar!/:?] ... 4 more 10:11:50.417 [Thread-12] INFO com.alibaba.otter.canal.client.impl.ClusterCanalConnector - restart the connector for next round retry.

原提问者GitHub用户wusthuke

展开
收起
绿子直子 2023-05-09 10:24:01 112 0
1 条回答
写回答
取消 提交回答
  • 你开了table的table tsdb的能力,这是一个定时任务,非主线影响client读取失败的原因

    原回答者GitHub用户agapple

    2023-05-10 09:38:01
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像