我使用debezium连接到Oracle数据库版本19 c。遵循debezium examples repository并使用Docker-compose脚本。为了使其工作,我必须修改debezium-with-oracle-jdbc的Docker文件。您可以在this repository中找到我的更改以供复制。
针对该问题:
当连接到数据库时,我得到了下面的异常。最初的步骤看起来是成功的,但我假设当恢复模式时,连接器崩溃了。我在代码中找到了这个地方,但我不能判断这是数据库问题还是从debezium连接到Kafka的问题。崩溃行可以在这里找到。
我在这里读到,通常表模式应该在崩溃阶段打印出来。可能是数据库用户缺少权限?我找不到连接数据库的用户需要哪些权限。
connect_1 | 2021-11-23 15:08:44,773 INFO Oracle|server1|snapshot Metrics registered [io.debezium.pipeline.ChangeEventSourceCoordinator]
connect_1 | 2021-11-23 15:08:44,773 INFO Oracle|server1|snapshot Context created [io.debezium.pipeline.ChangeEventSourceCoordinator]
connect_1 | 2021-11-23 15:08:44,776 INFO Oracle|server1|snapshot No previous offset has been found. [io.debezium.connector.oracle.OracleSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:08:44,776 INFO Oracle|server1|snapshot According to the connector configuration only schema will be snapshot. [io.debezium.connector.oracle.OracleSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:08:44,777 INFO Oracle|server1|snapshot Snapshot step 1 - Preparing [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:08:44,777 INFO Oracle|server1|snapshot Snapshot step 2 - Determining captured tables [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:08:55,141 INFO Oracle|server1|snapshot Snapshot step 3 - Locking captured tables [<Disclosed, but found 323 tables in total>] [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:09:11,187 INFO Oracle|server1|snapshot Snapshot step 4 - Determining snapshot offset [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:09:12,023 INFO Oracle|server1|snapshot Snapshot step 5 - Reading structure of captured tables [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:09:43,928 INFO || WorkerSourceTask{id=inventory-connector-0} flushing 0 outstanding messages for offset commit [org.apache.kafka.connect.runtime.WorkerSourceTask]
connect_1 | 2021-11-23 15:09:53,390 INFO Oracle|server1|snapshot Snapshot step 6 - Persisting schema history [io.debezium.relational.RelationalSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:09:53,438 INFO Oracle|server1|snapshot Snapshot - Final stage [io.debezium.pipeline.source.AbstractSnapshotChangeEventSource]
connect_1 | 2021-11-23 15:09:53,439 ERROR Oracle|server1|snapshot Producer failure [io.debezium.pipeline.ErrorHandler]
connect_1 | io.debezium.DebeziumException: java.lang.NullPointerException
connect_1 | at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:80)
connect_1 | at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:118)
connect_1 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
connect_1 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
connect_1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
connect_1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
connect_1 | at java.base/java.lang.Thread.run(Thread.java:829)
connect_1 | Caused by: java.lang.NullPointerException
connect_1 | at io.debezium.relational.RelationalSnapshotChangeEventSource.createSchemaChangeEventsForTables(RelationalSnapshotChangeEventSource.java:277)
connect_1 | at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:124)
connect_1 | at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
connect_1 | ... 6 more
connect_1 | 2021-11-23 15:09:53,445 INFO Oracle|server1|snapshot Connected metrics set to 'false' [io.debezium.pipeline.metrics.StreamingChangeEventSourceMetrics]
connect_1 | 2021-11-23 15:09:53,909 INFO || WorkerSourceTask{id=inventory-connector-0} flushing 0 outstanding messages for offset commit [org.apache.kafka.connect.runtime.WorkerSourceTask]
connect_1 | 2021-11-23 15:09:53,910 ERROR || WorkerSourceTask{id=inventory-connector-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted [org.apache.kafka.connect.runtime.WorkerTask]
connect_1 | org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
connect_1 | at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42)
connect_1 | at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:135)
connect_1 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
connect_1 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
connect_1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
connect_1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
connect_1 | at java.base/java.lang.Thread.run(Thread.java:829)
connect_1 | Caused by: io.debezium.DebeziumException: java.lang.NullPointerException
connect_1 | at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:80)
connect_1 | at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:118)
connect_1 | ... 5 more
connect_1 | Caused by: java.lang.NullPointerException
connect_1 | at io.debezium.relational.RelationalSnapshotChangeEventSource.createSchemaChangeEventsForTables(RelationalSnapshotChangeEventSource.java:277)
connect_1 | at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:124)
connect_1 | at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
connect_1 | ... 6 more
connect_1 | 2021-11-23 15:09:53,911 INFO || Stopping down connector [io.debezium.connector.common.BaseSourceTask]
1条答案
按热度按时间h5qlskok1#
我也遇到了同样的问题,但我发现当传递属性“schema.history.internal.store.only.captured.tables.ddl”为false时,错误停止发生,但我需要将其设置为true才能工作:
“类”:“io.debezium.连接器.oracle. oracle连接器”,“类型”:“来源”、“版本”:“2.0.1.最终版”