当前位置: 首页 > 知识库问答 >
问题:

debezium 0.8.0 mysql连接器解析binlog失败,表。columnWithName返回null,为什么会发生这种情况?

笪健
2023-03-14

当有人通过IDEA修改表时,debezium连接器任务由于NullPointerExctive而失败。

这是Kafka连接日志:

INFO: Connected to 192.168.1.204:3306 at mysql-bin.000098/467648 (sid:184054, cid:59755)
[2018-08-07 19:05:15,309] INFO Connected to MySQL binlog at 192.168.1.204:3306, starting at binlog file 'mysql-bin.000098', pos=467648, skipping 2 events plus 0 rows (    io.debezium.connector.mysql.BinlogReader:941)
[2018-08-07 19:05:15,309] INFO WorkerSourceTask{id=debezium-mysql-source-dev-0} Source task finished initialization and start (org.apache.kafka.connect.runtime.WorkerSourceTask:165)
[2018-08-07 19:05:15,311] INFO Creating thread debezium-mysqlconnector-dev-binlog-client (io.debezium.util.Threads:247)
[2018-08-07 19:05:15,364] INFO Cluster ID: rse1l3gPRJW9-aJLJMB8YA (org.apache.kafka.clients.Metadata:265)
[2018-08-07 19:05:15,370] ERROR Error during binlog processing. Last offset stored = null, binlog reader near position = mysql-bin.000098/467713 (    io.debezium.connector.mysql.BinlogReader:967)
[2018-08-07 19:05:15,371] ERROR Failed due to error: Error processing binlog event (io.debezium.connector.mysql.BinlogReader:179)
org.apache.kafka.connect.errors.ConnectException: Unexpected exception while parsing statement /* ApplicationName=IntelliJ IDEA 2017.2.4 */ ALTER TABLE fund_account ALTER COLUMN     is_use_pay SET DEFAULT 0 at line 1, column 99
        at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:200)
        at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:178)
        at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:452)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1055)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:913)
        at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:559)
        at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:793)
        at java.lang.Thread.run(Thread.java:748)
Caused by: io.debezium.text.ParsingException: Unexpected exception while parsing statement /* ApplicationName=IntelliJ IDEA 2017.2.4 */ ALTER TABLE fund_account ALTER COLUMN     is_use_pay SET DEFAULT 0 at line 1, column 99
        at io.debezium.relational.ddl.LegacyDdlParser.parsingFailed(LegacyDdlParser.java:555)
        at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:227)
        at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:200)
        at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:298)
        at io.debezium.connector.mysql.BinlogReader.handleQueryEvent(BinlogReader.java:637)
        at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:436)
        ... 5 more
Caused by: java.lang.NullPointerException
        at io.debezium.connector.mysql.MySqlDdlParser.parseAlterSpecification(MySqlDdlParser.java:1296)
        at io.debezium.connector.mysql.MySqlDdlParser.parseAlterSpecificationList(MySqlDdlParser.java:1254)
        at io.debezium.connector.mysql.MySqlDdlParser.parseAlterTable(MySqlDdlParser.java:1237)
        at io.debezium.connector.mysql.MySqlDdlParser.parseAlter(MySqlDdlParser.java:1199)
        at io.debezium.connector.mysql.MySqlDdlParser.parseNextStatement(MySqlDdlParser.java:177)
        at io.debezium.relational.ddl.LegacyDdlParser.parse(LegacyDdlParser.java:219)
        ... 9 more
[2018-08-07 19:05:15,373] INFO Error processing binlog event, and propagating to Kafka Connect so it stops this connector. Future binlog events read before connector is shutdown will     be ignored. (io.debezium.connector.mysql.BinlogReader:457)

以下是mysql binlog:

/*!\C utf8mb4 *//*!*/;
SET@@session.character_set_client=45,@@session.collation_connection=45,@@session.collation_server=224/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
/* ApplicationName=IntelliJ IDEA 2017.2.4 */ ALTER TABLE fund_account 
ALTER COLUMN is_use_pay SET DEFAULT 0
/*!*/;
# at 467906
#180806 12:26:09 server id 1  end_log_pos 467971 CRC32 0x28ebc3fa    
Anonymous_GTID  last_committed=833  sequence_number=834 rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;
# at 467971

debezium似乎无法解析更改表基金_accountalter COLUMN是_use_pay SET DEFAULT 0

共有1个答案

盛跃
2023-03-14

有趣的是,你能从其他的clint而不是IDEA尝试一下吗?

您也可以尝试使用ddl。解析器。模式设置为antlr

如果问题仍然存在,你能在Jira项目中提出一个问题吗?

谢啦

 类似资料:
  • 问题内容: 因此,当我发现一些非常奇怪的东西时,我正在使用Node.js REPL和Underscore库。如果I ,则该变量是全局设置的(显然)。然后,当我尝试运行一个简单的命令时,它会打印出来(显然,再次)。但是,此后立即运行,因为变量设置为,它会打印。 为什么这样做呢?如果我从js文件运行相同的代码,则不会发生。这是正常的Node事情,还是全部错误? 仅供参考:节点v0.10.10 问题答案

  • 根据Java教程 将包装类型(整数)的对象转换为其相应的基元(int)值称为取消装箱。当包装类的对象为: 作为参数传递给需要相应基元类型的值的方法 分配给相应基元类型的变量 为什么在这种情况下会发生拆箱? 在这种情况下,这些事情发生在哪里?是否有管理数组中元素访问的底层方法?或者[]暗示某种变量?

  • 安装问题 PS C:\Users\Administrator sharp@0.21.3安装C:\用户\管理员\gatsby-site3\node_modules\锐(节点安装/libvips 使用缓存的C:\Users\Administrator\AppData\Roaming\npm-cache\u libvips\libvips-8.7.0-win32-x64.tar.gz info shar

  • reactive 收集依赖不是要通过 Proxy 触发 get 吗,为什么这里只是打印 obj(没有触发 get),也能够收集到依赖?

  • 我关闭了我的android项目,突然当我想再次打开我的项目时,它给了我错误??? 错误:无法解析“:app@debugandroidtest/compileclasspath”的依赖项:无法解析AndroidX.test:runner:1.2.0. 错误:无法解析“:app@debugandroidtest/compileclasspath”的依赖项:无法解析Androidx.test.ext:J

  • 问题内容: 我试图在Windows 2008 R2中使用Kibana运行ElasticSearch。 我关注了这篇文章:在带有木瓜的Windows服务器上安装logstash 一步一步,但我得到的是: 当我去 我得到: 因此,似乎ElasticSearch正在运行,但是由于某些原因,Kibana无法连接到它。 ElasticSearch日志包含错误: 知道我在做什么错吗? 问题答案: 我也遇到过类