在 CentOS 7.9 下面使用 docker-compose 的方式安装 canal-server 1.1.4,并将消息推送到 kafka,结果 kafka 没有接收到任何消息,查看 canal.log,提示空指针异常。
2022-02-10 01:53:59.871 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## set default uncaught exception handler 2022-02-10 01:53:59.935 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## load canal configurations 2022-02-10 01:53:59.954 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## start the canal server. 2022-02-10 01:53:59.980 [main] ERROR com.alibaba.otter.canal.deployer.CanalLauncher - ## Something goes wrong when starting up the canal Server: java.lang.NullPointerException: null at com.alibaba.otter.canal.deployer.CanalController.parseInstanceConfig(CanalController.java:438) ~[canal.deployer-1.1.4.jar:na] at com.alibaba.otter.canal.deployer.CanalController.initInstanceConfig(CanalController.java:413) ~[canal.deployer-1.1.4.jar:na] at com.alibaba.otter.canal.deployer.CanalController.(CanalController.java:88) ~[canal.deployer-1.1.4.jar:na] at com.alibaba.otter.canal.deployer.CanalStarter.start(CanalStarter.java:77) ~[canal.deployer-1.1.4.jar:na] at com.alibaba.otter.canal.deployer.CanalLauncher.main(CanalLauncher.java:115) ~[canal.deployer-1.1.4.jar:na]
docker-compose.yml
version: '3.1' services: canal-server: image: canal/canal-server:v1.1.4 container_name: canal-server restart: always ports: - 11111:11111 volumes: - ./conf/canal.properties:/home/admin/canal-server/conf/canal.properties - ./conf/test/instance.properties:/home/admin/canal-server/conf/test/instance.properties - ./logs/:/home/admin/canal-server/logs/
canal.properties
canal.serverMode = kafka
canal.instance.parser.parallelThreadSize = 16
canal.mq.servers = 127.0.0.1:9092
canal.destinations = test
instance.properties
canal.instance.master.address=127.0.0.1:3306
canal.instance.master.journal.name=mysql-bin.000006 canal.instance.master.position=4596
canal.instance.dbUsername=canal canal.instance.dbPassword=Canal@123456 canal.instance.connectionCharset = UTF-8 #MQ队列名称 canal.mq.topic=canalTopic #单队列模式的分区下标 canal.mq.partition=0
原提问者GitHub用户UnityAlvin
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。