Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4010

Oracle connector fails after error ORA-01327

XMLWordPrintable

      While running the Oracle connector the following error is observed.

      org.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:42)
      	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:211)
      	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:63)
      	at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:159)
      	at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:122)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.sql.SQLException: ORA-01327: failed to exclusively lock system dictionary as required by build
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7384
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7398
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7554
      ORA-06512: at "SYS.DBMS_LOGMNR_D", line 12
      ORA-06512: at line 1
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:553)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
      	at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:265)
      	at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:86)
      	at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:965)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1205)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)
      	at oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1358)
      	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3778)
      	at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4251)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1081)
      	at io.debezium.connector.oracle.logminer.LogMinerHelper.executeCallableStatement(LogMinerHelper.java:701)
      	at io.debezium.connector.oracle.logminer.LogMinerHelper.buildDataDictionary(LogMinerHelper.java:99)
      	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.initializeRedoLogsForMining(LogMinerStreamingChangeEventSource.java:246)
      	at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:167)
      	... 8 more
      Caused by: Error : 1327, Position : 0, Sql = BEGIN DBMS_LOGMNR_D.BUILD (options => DBMS_LOGMNR_D.STORE_IN_REDO_LOGS); END;, OriginalSql = BEGIN DBMS_LOGMNR_D.BUILD (options => DBMS_LOGMNR_D.STORE_IN_REDO_LOGS); END;, Error Msg = ORA-01327: failed to exclusively lock system dictionary as required by build
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7384
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7398
      ORA-06512: at "SYS.DBMS_LOGMNR_INTERNAL", line 7554
      ORA-06512: at "SYS.DBMS_LOGMNR_D", line 12
      ORA-06512: at line 1
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
      	... 26 more
      

      While the data dictionary needs to be written to the redo logs for the default mining strategy to work, this error shouldn't be considered a hard failure and should be retried. LogMiner will attempt to retry internally but there may be situations where the dictionary is unavailable for long periods of time, such as during a hot backup and therefore the connector should recover from this more gracefully.

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: