开发者社区> 问答> 正文

canal配置后example.log有WARN报错

canal-server:1.1.4

按照官网教程 canal-php 搭建完毕之后,正常启动了服务

instance配置如下 ` canal.instance.mysql.slaveId=1234 4 5 # enable gtid use true/false 6 #canal.instance.gtidon=false 7 8 # position info 9 canal.instance.master.address=127.0.0.1:3306 10 canal.instance.master.journal.name= 11 canal.instance.master.position= 12 canal.instance.master.timestamp= 13 #canal.instance.master.gtid= 14 15 # rds oss binlog 16 #canal.instance.rds.accesskey= 17 #canal.instance.rds.secretkey= 18 #canal.instance.rds.instanceId= 19 20 # table meta tsdb info 21 canal.instance.tsdb.enable=true 22 #canal.instance.tsdb.url=jdbc:mysql://127.0.0.1:3306/canal_tsdb 23 #canal.instance.tsdb.dbUsername=canal 24 #canal.instance.tsdb.dbPassword=canal 25 26 #canal.instance.standby.address = 27 #canal.instance.standby.journal.name = 28 #canal.instance.standby.position = 29 #canal.instance.standby.timestamp = 30 #canal.instance.standby.gtid= 31 32 # system has only one cpu 33 canal.instance.parser.parallel=false 34 35 # username/password 36 canal.instance.dbUsername=canal 37 canal.instance.dbPassword=canal 38 canal.instance.connectionCharset = UTF-8 39 canal.instance.defaultDatabaseName= 40 # enable druid Decrypt database password 41 canal.instance.enableDruid=false 42 #canal.instance.pwdPublicKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALK4BUxdDltRRE5/zXpVEVPUgunvscYFtEip3pmLlhrWpacX7y7GCMo2/JM6LeHmiiNdH1FWgGCpUfircSwlWKUCAwEAAQ== 43 44 # table regex 45 canal.instance.filter.regex= 46 47 # table black regex 48 canal.instance.filter.black.regex=

mq config

55 canal.mq.topic=example canal.mq.partition=0 `

canal-server log正常 example log 如下 ` 2020-10-10 10:09:24.449 [Thread-6] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop CannalInstance for null-example

2020-10-10 10:09:24.533 [Thread-6] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop successful.... 2020-10-10 10:09:33.032 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2020-10-10 10:09:33.042 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2020-10-10 10:09:33.251 [main] WARN o.s.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'connectionCharset' being accessed! Ambiguous write methods found next to actually used [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.lang.String)]: [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.nio.charset.Charset)] 2020-10-10 10:09:33.342 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2020-10-10 10:09:33.344 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2020-10-10 10:09:34.038 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2020-10-10 10:09:34.047 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : 2020-10-10 10:09:34.047 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : 2020-10-10 10:09:34.231 [destination = example , address = /127.0.0.1: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 2020-10-10 10:09:34.279 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to ... 2020-10-10 10:09:34.280 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ 2020-10-10 10:09:34.280 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2020-10-10 10:09:34.313 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"localhost","port":3306}},"postion":{"gtid":"","included":false,"journalName":"mysql-bin.000013","position":9850,"serverId":1,"timestamp":1602239827000}} 2020-10-10 10:09:34.872 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000013,position=9850,serverId=1,gtid=,timestamp=1602239827000] cost : 611ms , the next step is binlog dump 2020-10-10 10:10:02.831 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to ... 2020-10-10 10:10:02.831 [New I/O server worker #1-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ `

使用中碰到的问题是,客户端能够拿到 sql,但是无法获取到对应的 RowData ` ================> binlog[mysql-bin.000013 : 10053],name[canal,user], eventType: 2 update user set name='test1' where age=302

object(Google\Protobuf\Internal\RepeatedField)#552 (4) { ["container":"Google\Protobuf\Internal\RepeatedField":private]=> array(0) { } ["type":"Google\Protobuf\Internal\RepeatedField":private]=> int(11) ["klass":"Google\Protobuf\Internal\RepeatedField":private]=> string(40) "Com\Alibaba\Otter\Canal\Protocol\RowData" ["legacy_klass":"Google\Protobuf\Internal\RepeatedField":private]=> string(40) "Com\Alibaba\Otter\Canal\Protocol\RowData" } `

怀疑的方向是配置问题,但是不知道具体是哪里,看了很多其他的 Issue和问答,没有解决这个问题,望大佬帮忙

原提问者GitHub用户loving-irene

展开
收起
山海行 2023-04-27 19:55:50 173 0
1 条回答
写回答
取消 提交回答
  • 已经解决

    MySQL 的 binlog-format 没有变更为 ROW,变更 /etc/my.cnf 重启后并没有生效,最后是在 mysql 客户端里检查出来的,设置之后就 ok 了,需要注意的是 mysql 配置有 global 和 session 两个级别。

    原回答者GitHub用户loving-irene

    2023-04-28 14:35:28
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载
Kubernetes下日志实时采集、存储与计算实践 立即下载
日志数据采集与分析对接 立即下载