Hi there,
I'm having trouble with the Debezium Oracle connector when setting up the initial snapshot on Oracle (19.c SE 2). Currently using the latest 1.9 docker image. Tried with 2.0alpha as well, facing the same issue.
I get the following log output in the final snapshot stage:
---
{"logMessage": "Snapshot - Final stage", "level": "INFO"}
{"logMessage": "Producer failure", "level": "ERROR"}
io.debezium.DebeziumException: java.sql.SQLException: ORA-01086: savepoint 'DBZ_SCHEMA_SNAPSHOT' never established in this session or is invalid
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)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.SQLException: ORA-01086: savepoint 'DBZ_SCHEMA_SNAPSHOT' never established in this session or is invalid
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1661)
at oracle.jdbc.driver.OracleStatement.executeLargeUpdate(OracleStatement.java:1626)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1613)
at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:282)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:4002)
at io.debezium.connector.oracle.OracleSnapshotChangeEventSource.releaseSchemaSnapshotLocks(OracleSnapshotChangeEventSource.java:123)
at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:122)
at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:76)
... 8 more
Caused by: Error : 1086, Position : 0, Sql = ROLLBACK TO dbz_schema_snapshot, OriginalSql = ROLLBACK TO dbz_schema_snapshot, Error Msg = ORA-01086: savepoint 'DBZ_SCHEMA_SNAPSHOT' never established in this session or is invalid
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
... 25 more
---
It says it cannot rollback to the dbz_schema_snapshot savepoint and thus fails.
However, I wonder if this rollback is expected behaviour or if the reason for the rollback is the real cause for the connector to stop. Note the "producer failure" error just above the exception.
I tried starting the connector with Debug log level, but gained no further insights.
Anyhow, I noticed that this error appears to be flaky. Once the schema change topic (which equals the logical server name) has been created by sending first messages, the connector has no problems coming up and performing the snapshot. When I reset the connector by deleting all topics, I keep getting this error until the schema change topic has been created by sending messages to it. For me, this looks like a race condition, as I cannot gain any further insights from the logs.
Is this a known issue? Any ideas on how to fix it?
Best regards and thanks,
Niklas