canal1.1.4,单机tcp,启动后没有meta.bat

polkgigr  于 2022-12-31  发布在  其他
关注(0)|答案(2)|浏览(417)

mysql 用户root拥有全部权限; mysql配置是正确的;canal.properties用的是默认配置;example中instance.properties配置如下
`#################################################

mysql serverId , v1.0.26+ will autoGen

canal.instance.mysql.slaveId=2345

enable gtid use true/false

canal.instance.gtidon=false

position info

canal.instance.master.address=10.228.129.228:3306
canal.instance.master.journal.name=
canal.instance.master.position=
canal.instance.master.timestamp=
canal.instance.master.gtid=

rds oss binlog

canal.instance.rds.accesskey=
canal.instance.rds.secretkey=
canal.instance.rds.instanceId=

table meta tsdb info

canal.instance.tsdb.enable=true
#canal.instance.tsdb.url=jdbc:mysql://127.0.0.1:3306/canal_tsdb
#canal.instance.tsdb.dbUsername=canal
#canal.instance.tsdb.dbPassword=canal

#canal.instance.standby.address =
#canal.instance.standby.journal.name =
#canal.instance.standby.position =
#canal.instance.standby.timestamp =
#canal.instance.standby.gtid=

username/password

canal.instance.dbUsername=root
canal.instance.dbPassword=123456
canal.instance.connectionCharset = UTF-8

enable druid Decrypt database password

canal.instance.enableDruid=false
#canal.instance.pwdPublicKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALK4BUxdDltRRE5/zXpVEVPUgunvscYFtEip3pmLlhrWpacX7y7GCMo2/JM6LeHmiiNdH1FWgGCpUfircSwlWKUCAwEAAQ==

table regex

canal.instance.filter.regex=...

table black regex

canal.instance.filter.black.regex=mysql.slave_.*

table field filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)

#canal.instance.filter.field=test1.t_product:id/subject/keywords,test2.t_company:id/name/contact/ch

table field black filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)

#canal.instance.filter.black.field=test1.t_product:subject/product_image,test2.t_company:id/name/contact/ch

mq config

canal.mq.topic=examplewg

dynamic topic route by schema or table regex

#canal.mq.dynamicTopic=mytest1.user,mytest2..,...*
canal.mq.partition=0

hash partition config

#canal.mq.partitionsNum=3
#canal.mq.partitionHash=test.table:id^name,...
#canal.mq.dynamicTopicPartitionNum=test.*:4,mycanal:6
#################################################`

当前canal已经启动成功
2021-05-19 16:08:37.044 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## set default uncaught exception handler 2021-05-19 16:08:37.078 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## load canal configurations 2021-05-19 16:08:37.090 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## start the canal server. 2021-05-19 16:08:37.183 [main] INFO com.alibaba.otter.canal.deployer.CanalController - ## start the canal server[172.31.35.28(172.31.35.28):11111] 2021-05-19 16:08:38.204 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## the canal server is running now ......

example.log也有数据:
2021-05-19 16:08:38.162 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2021-05-19 16:08:38.170 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^.*\..*$ 2021-05-19 16:08:38.170 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : ^mysql\.slave_.*$ 2021-05-19 16:08:38.175 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2021-05-19 16:08:38.269 [destination = example , address = /10.228.129.228:3306 , 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 2021-05-19 16:08:38.269 [destination = example , address = /10.228.129.228:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status 2021-05-19 16:08:40.717 [destination = example , address = /10.228.129.228:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=binlog.000005,position=50187073,serverId=1,gtid=,timestamp=1621411391000] cost : 2440ms , the next step is binlog dump

但是 conf下没有meta.dat文件;同时,mysql数据变更后example.log文件没有变化

dzjeubhm

dzjeubhm1#

哥们,你这个问题解决了没,我也遇到同样的问题,坑的一,找了好久无果

luaexgnf

luaexgnf2#

哥们,你这个问题解决了没,我也遇到同样的问题,坑的一,找了好久无果

看了Canal的源码, 只有client启动并开始消费后,server端conf下才会生成meta.dat文件; 我之前的问题是client端有问题

相关问题