canal接受mysql数据,并发送到kafka mysql的主从与kafka都能正常独立工作,但是canal启动不了(偶发性能正常工作),canal.log与example.log如下 canal.log的错误log:
2022-06-01 18:25:31.241 [Thread-8] INFO c.a.o.canal.connector.kafka.producer.CanalKafkaProducer - ## stop the kafka producer 2022-06-01 18:25:31.241 [Thread-7] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## stop the canal server 2022-06-01 18:25:31.246 [Thread-8] INFO c.a.o.canal.connector.kafka.producer.CanalKafkaProducer - ## kafka producer is down. 2022-06-01 18:25:31.250 [Thread-7] INFO com.alibaba.otter.canal.deployer.CanalController - ## stop the canal server[localhost(localhost):11111] 2022-06-01 18:25:31.256 [Thread-7] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## canal server is down. 2022-06-01 18:25:33.646 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## set default uncaught exception handler 2022-06-01 18:25:33.656 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## load canal configurations 2022-06-01 18:25:33.779 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## start the canal server. 2022-06-01 18:25:33.994 [main] INFO com.alibaba.otter.canal.deployer.CanalController - ## start the canal server[localhost(localhost):11111] 2022-06-01 18:25:35.927 [main] ERROR c.a.o.c.common.zookeeper.running.ServerRunningMonitor - start failed com.google.common.util.concurrent.UncheckedExecutionException: com.alibaba.fastjson2.JSONException: read field error : clientDatas at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.get(LocalCache.java:4147) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140) ~[guava-22.0.jar:na] at com.google.common.collect.MigrateMap$MigrateConcurrentMap.get(MigrateMap.java:68) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.meta.MemoryMetaManager.listAllSubscribeInfo(MemoryMetaManager.java:72) ~[canal.meta-1.1.6.jar:na] at com.alibaba.otter.canal.instance.core.AbstractCanalInstance.afterStartEventParser(AbstractCanalInstance.java:149) ~[canal.instance.core-1.1.6.jar:na] at com.alibaba.otter.canal.instance.core.AbstractCanalInstance.start(AbstractCanalInstance.java:97) ~[canal.instance.core-1.1.6.jar:na] at com.alibaba.otter.canal.instance.spring.CanalInstanceWithSpring.start(CanalInstanceWithSpring.java:31) ~[canal.instance.spring-1.1.6.jar:na] at com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded.start(CanalServerWithEmbedded.java:136) ~[canal.server-1.1.6.jar:na] at com.alibaba.otter.canal.deployer.CanalController$1.processActiveEnter(CanalController.java:152) ~[canal.deployer-1.1.6.jar:na] at com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.processActiveEnter(ServerRunningMonitor.java:242) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.initRunning(ServerRunningMonitor.java:145) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.start(ServerRunningMonitor.java:97) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.deployer.CanalController.start(CanalController.java:497) [canal.deployer-1.1.6.jar:na] at com.alibaba.otter.canal.deployer.CanalStarter.start(CanalStarter.java:89) [canal.deployer-1.1.6.jar:na] at com.alibaba.otter.canal.deployer.CanalLauncher.main(CanalLauncher.java:124) [canal.deployer-1.1.6.jar:na] Caused by: com.alibaba.fastjson2.JSONException: read field error : clientDatas at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:241) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.JSON.parseObject(JSON.java:258) ~[fastjson2-2.0.4.jar:na] at com.alibaba.otter.canal.common.utils.JsonUtils.unmarshalFromString(JsonUtils.java:51) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.meta.FileMixedMetaManager.loadDataFromFile(FileMixedMetaManager.java:175) ~[canal.meta-1.1.6.jar:na] at com.alibaba.otter.canal.meta.FileMixedMetaManager.loadClientIdentity(FileMixedMetaManager.java:225) ~[canal.meta-1.1.6.jar:na] at com.google.common.collect.MigrateMap$1.load(MigrateMap.java:23) ~[canal.common-1.1.6.jar:na] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212) ~[guava-22.0.jar:na] ... 16 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : cursor at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:243) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderImplList.readObject(ObjectReaderImplList.java:435) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 26 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : identity at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:241) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 29 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : sourceAddress at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:243) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 31 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: create instance error, class java.net.InetSocketAddress at com.alibaba.fastjson2.reader.ObjectReaderAdapter.createInstance0(ObjectReaderAdapter.java:178) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderAdapter.createInstance(ObjectReaderAdapter.java:233) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderBean.readObject(ObjectReaderBean.java:162) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 33 common frames omitted 2022-06-01 18:25:36.014 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## the canal server is running now ......
===============================================================================================
example.log错误log: 2022-06-01 18:25:35.869 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2022-06-01 18:25:35.883 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ 2022-06-01 18:25:35.884 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : ^mysql.slave_.*$ 2022-06-01 18:25:35.954 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop CannalInstance for null-example 2022-06-01 18:25:35.994 [destination = example , address = /192.168.50.151:13300 , 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 2022-06-01 18:25:35.998 [destination = example , address = /192.168.50.151:13300 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - parse events has an error com.alibaba.otter.canal.parse.exception.CanalParseException: dump address /192.168.50.151:13300 has an error, retrying. Caused by: com.google.common.util.concurrent.UncheckedExecutionException: com.alibaba.fastjson2.JSONException: read field error : clientDatas at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.get(LocalCache.java:4147) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140) ~[guava-22.0.jar:na] at com.google.common.collect.MigrateMap$MigrateConcurrentMap.get(MigrateMap.java:68) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.meta.MemoryMetaManager.listAllSubscribeInfo(MemoryMetaManager.java:72) ~[canal.meta-1.1.6.jar:na] at com.alibaba.otter.canal.parse.index.MetaLogPositionManager.getLatestIndexBy(MetaLogPositionManager.java:52) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.index.FailbackLogPositionManager.getLatestIndexBy(FailbackLogPositionManager.java:68) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:416) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:358) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:191) ~[canal.parse-1.1.6.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181] Caused by: com.alibaba.fastjson2.JSONException: read field error : clientDatas at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:241) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.JSON.parseObject(JSON.java:258) ~[fastjson2-2.0.4.jar:na] at com.alibaba.otter.canal.common.utils.JsonUtils.unmarshalFromString(JsonUtils.java:51) ~[canal.common-1.1.6.jar:na] at com.alibaba.otter.canal.meta.FileMixedMetaManager.loadDataFromFile(FileMixedMetaManager.java:175) ~[canal.meta-1.1.6.jar:na] at com.alibaba.otter.canal.meta.FileMixedMetaManager.loadClientIdentity(FileMixedMetaManager.java:225) ~[canal.meta-1.1.6.jar:na] at com.google.common.collect.MigrateMap$1.load(MigrateMap.java:23) ~[canal.common-1.1.6.jar:na] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299) ~[guava-22.0.jar:na] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212) ~[guava-22.0.jar:na] ... 11 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : cursor at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:243) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderImplList.readObject(ObjectReaderImplList.java:435) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 21 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : identity at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:241) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 24 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: read field error : sourceAddress at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:92) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReader2.readObject(ObjectReader2.java:243) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 26 common frames omitted Caused by: com.alibaba.fastjson2.JSONException: create instance error, class java.net.InetSocketAddress at com.alibaba.fastjson2.reader.ObjectReaderAdapter.createInstance0(ObjectReaderAdapter.java:178) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderAdapter.createInstance(ObjectReaderAdapter.java:233) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.ObjectReaderBean.readObject(ObjectReaderBean.java:162) ~[fastjson2-2.0.4.jar:na] at com.alibaba.fastjson2.reader.FieldReaderObjectMethod.readFieldValue(FieldReaderObjectMethod.java:90) ~[fastjson2-2.0.4.jar:na] ... 28 common frames omitted 2022-06-01 18:25:36.004 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop successful....
原提问者GitHub用户mylixiangxiang
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。