Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认开启tsdb,系统启动有异常 #440

Closed
showhand opened this issue Dec 7, 2017 · 5 comments
Closed

默认开启tsdb,系统启动有异常 #440

showhand opened this issue Dec 7, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@showhand
Copy link

showhand commented Dec 7, 2017

使用的1.0.25版本,其中默认开启了tsdb
启动后会报错

2017-12-07 17:16:23.254 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:3306 has an error, retrying. caused by
java.lang.NullPointerException: null
        at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:428) ~[canal.parse-1.0.25.jar:na]
        at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:348) ~[canal.parse-1.0.25.jar:na]
        at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:164) ~[canal.parse-1.0.25.jar:na]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_144]
2017-12-07 17:16:23.256 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.lang.NullPointerException
        at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:428)
        at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:348)
        at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:164)
        at java.lang.Thread.run(Unknown Source)

将 canal.instance.tsdb.spring.xml=classpath:spring/tsdb/h2-tsdb.xml 注释就好了
canal.instance.tsdb.enable设为false不起作用
另外希望有这些参数的详细说明

@agapple
Copy link
Member

agapple commented Dec 8, 2017

你初始启动的binlog位点指定了啥,照理不应该是有NPE啊,不会是指定了offest=4吧?

agapple added a commit that referenced this issue Dec 8, 2017
agapple added a commit that referenced this issue Dec 8, 2017
@showhand
Copy link
Author

showhand commented Dec 9, 2017

配置如下:

   canal.instance.master.journal.name= mysql-bin.000001
   canal.instance.master.position= 154
   canal.instance.master.timestamp=

看到上面有代码修改,但是只下canal编译不通过,得有druid的preview版本,是不是要修改一下,不方便测试

@agapple
Copy link
Member

agapple commented Dec 10, 2017

https://github.com/alibaba/druid,可以临时下载druid包,执行mvn clean install -Dmaven.test.skip即可生成preview版本

@agapple
Copy link
Member

agapple commented Dec 10, 2017

基于table tsdb的配置,如果在没有对应位点的timestamp时,会尝试通过binlog查找来确定时间戳,如果找不到就是这里的NPE.

table meta的历史多版本设计,主要是基于时间戳来定位,所以启动时任何一个时间点都必须要有一个时间戳

agapple added a commit that referenced this issue Dec 10, 2017
agapple added a commit that referenced this issue Dec 10, 2017
agapple added a commit that referenced this issue Dec 10, 2017
@agapple agapple self-assigned this Dec 27, 2017
@agapple agapple added the bug label Dec 27, 2017
@agapple agapple added this to the v1.0.26 milestone Dec 27, 2017
@agapple agapple closed this as completed Dec 27, 2017
@puffan
Copy link

puffan commented Feb 24, 2018

遇到同样的问题,切到 v1.0.26 的版本上 OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants