table meta tsdb info 如下
canal.instance.tsdb.enable = true canal.instance.tsdb.dir = ${canal.file.data.dir:../conf}/${canal.instance.destination:} #canal.instance.tsdb.url = jdbc:h2:${canal.instance.tsdb.dir}/h2;CACHE_SIZE=1000;MODE=MYSQL; canal.instance.tsdb.url = jdbc:mysql://10.16.14.14:3306/canal_tsdb #canal.instance.tsdb.spring.xml = classpath:spring/tsdb/h2-tsdb.xml canal.instance.tsdb.spring.xml = classpath:spring/tsdb/mysql-tsdb.xml canal.instance.tsdb.dbUsername = root canal.instance.tsdb.dbPassword = root
储存快照间隔,默认24小时
canal.instance.tsdb.snapshot.interval = 24
快照默认360小时(15天)过期
canal.instance.tsdb.snapshot.expire = 360
开启TSDB
一直有 2022-11-17 13:42:03.453 [canal-instance-scan-0] WARN com.alibaba.druid.pool.DruidDataSource - get connection timeout retry : 1 2022-11-17 13:42:05.313 [Druid-ConnectionPool-Create-277617834] ERROR com.alibaba.druid.pool.DruidDataSource - create connection RuntimeException java.lang.NullPointerException: null at java.util.Hashtable.put(Hashtable.java:459) ~[na:1.8.0_131] at java.util.Properties.setProperty(Properties.java:166) ~[na:1.8.0_131] at com.mysql.jdbc.NonRegisteringDriver.parseURL(NonRegisteringDriver.java:795) ~[mysql-connector-java-5.1.48.jar:5.1.48] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:314) ~[mysql-connector-java-5.1.48.jar:5.1.48] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1678) ~[druid-1.2.12.jar:1.2.12] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1755) ~[druid-1.2.12.jar:1.2.12] at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2825) ~[druid-1.2.12.jar:1.2.12]
日志非常多,有谁遇到过吗?
原提问者GitHub用户1037424761
解决方案
升级 druid,我看 1.2.15 版本已经 fix 了 https://github.com/alibaba/druid/blob/1.2.15/core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java#L1751
曲线救国,跳过参数设置
原回答者GitHub用户fengjx
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。