使用debezium采集oracle数据报错: NonRelationalTableException: Table xxx is not a relational table

使用debezium采集oracle日志数据的时候报错: Table xxx is not a relational table

报错日志如下:

traceorg.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
	at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50)
	at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:116)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.debezium.DebeziumException: io.debezium.DebeziumException: io.debezium.connector.oracle.OracleConnection$NonRelationalTableException: Table DB2.test.VTTJEB291SFMVYIWDJWAE962K6 is not a relational table
	at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:85)
	at io.debezium.pipeline.ChangeEventSourceCoordinator.doSnapshot(ChangeEventSourceCoordinator.java:155)
	at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:137)
	at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:109)
	... 5 more
Caused by: io.debezium.DebeziumException: io.debezium.connector.oracle.OracleConnection$NonRelationalTableException: 
Table EASDB2.EAS85.VTTJEB291SFMVYIWDJWAE962K6 is not a relational table
	at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.lambda$createSchemaChangeEventsForTables$0(OracleSnapshotChangeEventSource.java:235)
	at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:302)
	at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.createSchemaChangeEventsForTables(OracleSnapshotChangeEventSource.java:230)
	at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:121)
	at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:76)
	... 8 more
Caused by: io.debezium.connector.oracle.OracleConnection$NonRelationalTableException: Table EASDB2.EAS85.VTTJEB291SFMVYIWDJWAE962K6 is not a relational table
	at io.debezium.connector.oracle.OracleConnection.getTableMetadataDdl(OracleConnection.java:337)
	at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.getCreateTableEvent(OracleSnapshotChangeEventSource.java:251)
	at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.lambda$createSchemaChangeEventsForTables$0(OracleSnapshotChangeEventSource.java:232)
	... 12 more

kafka connect task配置:

curl -H "Content-Type: application/json" -X POST -d  '{
    "name": "source_test9999",
    "config": {
     "connector.class" : "io.debezium.connector.oracle.OracleConnector",
     "tasks.max" : "1",
     "database.server.name" : "cdctest9999",
     "database.hostname" : "xxx",
     "database.port" : "1521",
     "database.user" : "user111",
     "database.password" : "pwd222",
     "database.dbname" : "db2",
     "snapshot.mode" : "initial",
     "table.include.list": "sch22.compty",
     "database.history.kafka.bootstrap.servers" : "127.0.0.1:9092",
     "database.history.kafka.topic": "schema-changes.inventory9999",
     "event.processing.failure.handling.mode": "skip",
     "log.mining.strategy":"online_catalog",
     "time.precision.mode" : "connect",
     "decimal.handling.mode": "string"
  }
}' http://localhost:8083/connectors/

通过查看kafka-connect的执行日志发现,采集过程中task会扫描整库下所有的表的DDL语句,扫描到一个不存在的表,导致了该问题,扫描到的表在对应的oracle库下并不存在。

查看debezium官网:
设置参数
database.history.store.only.captured.tables.ddl" : "true"
该参数的含义是只采集需要监控表的ddl语句,也就是说只采集 table.include.list 配置的表的ddl语句,设置完成之后,任务运行正常,不会再出现该问题。

查看官方issues: https://github.com/debezium/debezium/pull/3757

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

雾岛与鲸

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值