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

启动canal报错误编码为1146的错误 #4219

Closed
clip-tail opened this issue Jun 11, 2022 · 17 comments
Closed

启动canal报错误编码为1146的错误 #4219

clip-tail opened this issue Jun 11, 2022 · 17 comments

Comments

@clip-tail
Copy link

canal版本

1.1.6

报错日志

2022-06-11 14:13:07.387 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /127.0.0.1:3306 has an error, retrying. caused by 
com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'xzw.BASE TABLE' doesn't exist, sqlState=42S02, sqlStateMarker=#]
 with command: show create table `xzw`.`t_1`;show create table `xzw`.`BASE TABLE`;
Caused by: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'xzw.BASE TABLE' doesn't exist, sqlState=42S02, sqlStateMarker=#]
 with command: show create table `xzw`.`t_1`;show create table `xzw`.`BASE TABLE`;
        at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.queryMulti(MysqlQueryExecutor.java:109) ~[canal.parse.driver-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.queryMulti(MysqlConnection.java:111) ~[canal.parse-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.dumpTableMeta(DatabaseTableMeta.java:233) ~[canal.parse-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:174) ~[canal.parse-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:142) ~[canal.parse-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:197) ~[canal.parse-1.1.6.jar:na]
        at java.lang.Thread.run(Thread.java:750) [na:1.8.0_331]

canal的instance.properties配置

#################################################
## mysql serverId , v1.0.26+ will autoGen
# canal.instance.mysql.slaveId=0

# enable gtid use true/false
canal.instance.gtidon=false

# position info
canal.instance.master.address=127.0.0.1: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=canal
canal.instance.dbPassword=canal
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=xzw\\..*
# 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=example
# dynamic topic route by schema or table regex
#canal.mq.dynamicTopic=mytest1.user,topic2:mytest2\\..*,.*\\..*
canal.mq.partition=0
# hash partition config
#canal.mq.enableDynamicQueuePartition=false
#canal.mq.partitionsNum=3
#canal.mq.dynamicTopicPartitionNum=test.*:4,mycanal:6
#canal.mq.partitionHash=test.table:id^name,.*\\..*
#################################################

mysql5.7的配置

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
validate_password_policy=0
validate_password_length=5

log-bin=mysql-bin # 开启 binlog
binlog-format=ROW # 选择 ROW 模式
server_id=1 # 配置 MySQL replaction 需要定义,不要和 canal 的 slaveId 重复

已经创建过canal用户并赋予select,replication slave,replication client权限可是一起动就报找不到base table这张表,换过几个数据库和canal版本都是这样

@jimmy384
Copy link

我也遇到了,我是 docker 启动的,你是吗?这是我的情况: #4220

@clip-tail
Copy link
Author

我也遇到了,我是 docker 启动的,你是吗?这是我的情况: #4220

我不是docker启动的,我是直接部署canal.deployer-1.1.6.tar.gz包启动的,windows和linux都试了,都是一样的问题

@jimmy384
Copy link

release页面的包上传时间是昨天, 但1.1.6是18天前发布的,感觉有点奇怪

@jimmy384
Copy link

用源码编译出1.1.6版本启动没问题,用1.1.6的docker镜像和 github release 页面下的包都有问题,应该是发布流程出问题了吧

@clip-tail
Copy link
Author

用源码编译出1.1.6版本启动没问题,用1.1.6的docker镜像和 github release 页面下的包都有问题,应该是发布流程出问题了吧

可能是的,试了一下1.1.4没问题

@azydbly
Copy link

azydbly commented Jun 13, 2022

解决了吗? 我也遇到这个问题了

@jimmy384
Copy link

解决了吗? 我也遇到这个问题了

今天好像重新上传包了,重新下载试试,我没试过

@azydbly
Copy link

azydbly commented Jun 13, 2022

解决了吗? 我也遇到这个问题了

今天好像重新上传包了,重新下载试试,我没试过

重新下载了,还是不可以,请问你咋解决的

@clip-tail
Copy link
Author

解决了吗? 我也遇到这个问题了

我降版本了

@carl-chang
Copy link

有解决的吗?我也是报这个,一直提示表 BASE TABLE' doesn't exist

@clip-tail
Copy link
Author

有解决的吗?我也是报这个,一直提示表 BASE TABLE' doesn't exist

暂时没有,我是先降版本了

@wujiayuan1996
Copy link

我也是,各位有解决么,我从来没有建过什么BASE TABLE这张表
Caused by: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'mysql.base table' doesn't exist, sqlState=42S02, sqlStateMarker=#]

com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'seata.BASE TABLE' doesn't exist, sqlState=42S02, sqlStateMarker=#]

@lb405828825
Copy link

image
我也遇到了,一直过不去。

@lixworld
Copy link

lixworld commented Jul 8, 2022

我做了以下配置就可以了:

canal.instance.filter.black.regex=.*\\.BASE.*

@lb405828825
Copy link

lb405828825 commented Jul 8, 2022 via email

@agapple
Copy link
Member

agapple commented Sep 1, 2022

1.1.6-hotfix版本已修复

@agapple agapple closed this as completed Sep 1, 2022
@lb405828825
Copy link

lb405828825 commented Sep 1, 2022 via email

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

No branches or pull requests

8 participants