开发者社区> 问答> 正文

NPE问题

mysql版本:5.6.26 canal版本,最新的1.1.2-SNAPSHOT 用的是内置kafka client

canal日志文件和instance日志文件都报该异常 在用最新的快照版本之前是有些instance可以跑起来,有一个也是报该异常。Issus里面没找到类似问题

2018-11-24 00:25:37.842 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 28,3 replyHeader:: 28,38655499345,-101 request:: '/otter/canal/destinations/t_uc_linkman_info/running,T response:: 2018-11-24 00:25:37.842 [canal-instance-scan-0] DEBUG org.I0Itec.zkclient.ZkClient - Subscribed data changes for /otter/canal/destinations/t_uc_linkman_info/running ...skipping... java.lang.NullPointerException: null at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.afterDump(MysqlEventParser.java:139) ~[canal.parse-1.1.2-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:304) ~[canal.parse-1.1.2-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181] 2018-11-24 00:25:37.937 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 32,8 replyHeader:: 32,38655499346,0 request:: '/otter/canal/destinations/t_uc_linkman_info,F response:: v{'running,'cluster} 2018-11-24 00:25:37.937 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 32,8 replyHeader:: 32,38655499346,0 request:: '/otter/canal/destinations/t_uc_linkman_info,F response:: v{'running,'cluster} 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - start CanalInstances[t_uc_linkman_info] successfully 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## Start the MQ work of destination:t_uc_linkman_info 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## Start the MQ work of destination:t_uc_linkman_info 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO c.a.o.canal.deployer.monitor.SpringInstanceConfigMonitor - auto notify start t_uc_linkman_info successful. 2018-11-24 00:25:37.938 [canal-instance-scan-0] INFO c.a.o.canal.deployer.monitor.SpringInstanceConfigMonitor - auto notify start t_uc_linkman_info successful. 2018-11-24 00:25:37.938 [pool-3-thread-2] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ producer: t_uc_linkman_info. 2018-11-24 00:25:37.938 [pool-3-thread-2] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ producer: t_uc_linkman_info. 2018-11-24 00:25:37.949 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 33,1 replyHeader:: 33,38655499347,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111,,v{s{31,s{'world,'anyone}}},1 response:: 2018-11-24 00:25:37.949 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 33,1 replyHeader:: 33,38655499347,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111,,v{s{31,s{'world,'anyone}}},1 response:: 2018-11-24 00:25:37.949 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 34,4 replyHeader:: 34,38655499347,-101 request:: '/otter/canal/destinations/t_uc_linkman_info/1001/cursor,F response:: 2018-11-24 00:25:37.949 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 34,4 replyHeader:: 34,38655499347,-101 request:: '/otter/canal/destinations/t_uc_linkman_info/1001/cursor,F response:: 2018-11-24 00:25:37.949 [pool-3-thread-2] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=t_uc_linkman_info,clientId=1001,filter=] with first position:null 2018-11-24 00:25:37.949 [pool-3-thread-2] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=t_uc_linkman_info,clientId=1001,filter=] with first position:null 2018-11-24 00:25:37.949 [pool-3-thread-2] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ producer: t_uc_linkman_info is running now ...... 2018-11-24 00:25:37.949 [pool-3-thread-2] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ producer: t_uc_linkman_info is running now ...... 2018-11-24 00:25:37.957 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 35,1 replyHeader:: 35,38655499348,0 request:: '/otter/canal/destinations/t_uc_linkman_info/1001,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_uc_linkman_info/1001 2018-11-24 00:25:37.957 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 35,1 replyHeader:: 35,38655499348,0 request:: '/otter/canal/destinations/t_uc_linkman_info/1001,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_uc_linkman_info/1001 2018-11-24 00:25:37.962 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 36,1 replyHeader:: 36,38655499349,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster,,v{s{31,s{'world,'anyone}}},0 response:: 2018-11-24 00:25:37.962 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 36,1 replyHeader:: 36,38655499349,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster,,v{s{31,s{'world,'anyone}}},0 response:: 2018-11-24 00:25:37.962 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 37,8 replyHeader:: 37,38655499349,-101 request:: '/otter/canal/destinations/t_uc_linkman_info/1001/mark,F response:: v{} 2018-11-24 00:25:37.962 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 37,8 replyHeader:: 37,38655499349,-101 request:: '/otter/canal/destinations/t_uc_linkman_info/1001/mark,F response:: v{} 2018-11-24 00:25:37.970 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 38,1 replyHeader:: 38,38655499350,0 request:: '/otter/canal/destinations/t_tc_project_invest_order,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order 2018-11-24 00:25:37.970 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 38,1 replyHeader:: 38,38655499350,0 request:: '/otter/canal/destinations/t_tc_project_invest_order,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order 2018-11-24 00:25:37.983 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 39,1 replyHeader:: 39,38655499351,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order/cluster 2018-11-24 00:25:37.983 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 39,1 replyHeader:: 39,38655499351,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order/cluster 2018-11-24 00:25:37.995 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 40,1 replyHeader:: 40,38655499352,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111,,v{s{31,s{'world,'anyone}}},1 response:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111 2018-11-24 00:25:37.995 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 40,1 replyHeader:: 40,38655499352,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111,,v{s{31,s{'world,'anyone}}},1 response:: '/otter/canal/destinations/t_tc_project_invest_order/cluster/172.20.200.13:11111 2018-11-24 00:25:38.004 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 41,1 replyHeader:: 41,38655499353,-110 request:: '/otter/canal ...skipping... java.lang.NullPointerException: null at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.afterDump(MysqlEventParser.java:139) ~[canal.parse-1.1.2-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:304) ~[canal.parse-1.1.2-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181] 2018-11-24 00:25:38.089 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 46,8 replyHeader:: 46,38655499354,0 request:: '/otter/canal/destinations/t_tc_project_invest_order,F response:: v{'running,'cluster} 2018-11-24 00:25:38.089 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 46,8 replyHeader:: 46,38655499354,0 request:: '/otter/canal/destinations/t_tc_project_invest_order,F response:: v{'running,'cluster} 2018-11-24 00:25:38.089 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2018-11-24 00:25:38.089 [canal-instance-scan-0] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - start CanalInstances[t_tc_project_invest_order] successfully 2018-11-24 00:25:38.089 [canal-instance-scan-0] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## Start the MQ work of destination:t_tc_project_invest_order 2018-11-24 00:25:38.089 [canal-instance-scan-0] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## Start the MQ work of destination:t_tc_project_invest_order 2018-11-24 00:25:38.090 [canal-instance-scan-0] INFO c.a.o.canal.deployer.monitor.SpringInstanceConfigMonitor - auto notify start t_tc_project_invest_order successful. 2018-11-24 00:25:38.090 [canal-instance-scan-0] INFO c.a.o.canal.deployer.monitor.SpringInstanceConfigMonitor - auto notify start t_tc_project_invest_order successful. 2018-11-24 00:25:38.090 [pool-3-thread-3] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ producer: t_tc_project_invest_order. 2018-11-24 00:25:38.090 [pool-3-thread-3] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ producer: t_tc_project_invest_order. 2018-11-24 00:25:38.091 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 47,4 replyHeader:: 47,38655499354,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001/cursor,F response:: 2018-11-24 00:25:38.091 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 47,4 replyHeader:: 47,38655499354,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001/cursor,F response:: 2018-11-24 00:25:38.091 [pool-3-thread-3] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=t_tc_project_invest_order,clientId=1001,filter=] with first position:null 2018-11-24 00:25:38.091 [pool-3-thread-3] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=t_tc_project_invest_order,clientId=1001,filter=] with first position:null 2018-11-24 00:25:38.091 [pool-3-thread-3] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ producer: t_tc_project_invest_order is running now ...... 2018-11-24 00:25:38.091 [pool-3-thread-3] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ producer: t_tc_project_invest_order is running now ...... 2018-11-24 00:25:38.102 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 48,1 replyHeader:: 48,38655499355,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order/1001 2018-11-24 00:25:38.102 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 48,1 replyHeader:: 48,38655499355,0 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001,,v{s{31,s{'world,'anyone}}},0 response:: '/otter/canal/destinations/t_tc_project_invest_order/1001 2018-11-24 00:25:38.103 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 49,8 replyHeader:: 49,38655499355,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001/mark,F response:: v{} 2018-11-24 00:25:38.103 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x166d3d8e2d8a74b, packet:: clientPath:null serverPath:null finished:false header:: 49,8 replyHeader:: 49,38655499355,-101 request:: '/otter/canal/destinations/t_tc_project_invest_order/1001/mark,F response:: v{} 2018-11-24 00:25:58.095 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:25:58.095 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:18.115 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:18.115 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:38.133 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:38.133 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:58.152 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:26:58.152 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:27:18.173 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 2ms 2018-11-24 00:27:18.173 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 2ms 2018-11-24 00:27:38.193 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:27:38.193 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:27:58.205 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:27:58.205 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:28:18.226 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:28:18.226 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms 2018-11-24 00:28:38.241 [main-SendThread(cdh14.com:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x166d3d8e2d8a74b after 1ms

原提问者GitHub用户lisonz

展开
收起
Java工程师 2023-05-08 17:37:46 145 0
1 条回答
写回答
取消 提交回答
  • 本地没有重现,有条件的话做一下代码debug

    原回答者GitHub用户agapple

    2023-05-09 18:39:58
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载