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

ORA-01284 file cannot be opened error when file locked by another process

    XMLWordPrintable

Details

    Description

      Hi there, 

      I encounter this error after running the debezium oracle connector with logminer for 30 mins. I need to restart the connector when I see this error.  I'm running Oracle 11g and below is my config. I've checked my oracle database and i have the archive log file in my archivelog directory. Please let me know if there's any configuration issues.

      {
        "database.tablename.case.insensitive": "true",
        "database.schema": "######",
        "database.oracle.version": "11",
        "name": "star-connector",
        "connector.class": "io.debezium.connector.oracle.OracleConnector",
        "tasks.max": "1",
        "errors.retry.timeout": "10",
        "database.hostname": "###",
        "database.port": "1521",
        "database.user": "#####",
        "database.password": "**********",
        "database.server.name": "######",
        "database.dbname": "#####",
        "snapshot.mode": "initial",
        "database.connection.adapter": "logminer",
        "database.history.kafka.bootstrap.servers": "broker:29092",
        "database.history.kafka.topic": "schema-changes.star",
        "table.include.list": [
          "#####.####"
        ],
        "log.mining.archive.log.hours": "0"
      }
      

      This is the Error

      {
        "name": "####-connector",
        "connector": {
          "state": "RUNNING",
          "worker_id": "connect:8083"
        },
        "tasks": [
          {
            "id": 0,
            "state": "FAILED",
            "worker_id": "connect:8083",
            "trace": "org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.\n\tat io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42)\n\tat io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:209)\n\tat io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:140)\n\tat io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$####t$0(ChangeEventSourceCoordinator.java:113)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: java.sql.SQLException: ORA-01284: file I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001 cannot be opened\nORA-00308: cannot open archived log 'I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001'\nORA-06512: at \"SYS.DBMS_LOGMNR\", line 68\nORA-06512: at line 1\n\n\tat oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)\n\tat oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)\n\tat oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1052)\n\tat oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:537)\n\tat oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:255)\n\tat oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610)\n\tat oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:249)\n\tat oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:82)\n\tat oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:924)\n\tat oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1136)\n\tat oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3640)\n\tat oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1318)\n\tat oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3752)\n\tat oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4242)\n\tat oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079)\n\tat io.debezium.connector.oracle.logminer.LogMinerHelper.executeCallableStatement(LogMinerHelper.java:598)\n\tat io.debezium.connector.oracle.logminer.LogMinerHelper.setRedoLogFilesForMining(LogMinerHelper.java:501)\n\tat io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.initializeRedoLogsForMining(LogMinerStreamingChangeEventSource.java:291)\n\tat io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:175)\n\t... 7 more\nCaused by: Error : 1284, Position : 0, Sql = BEGIN sys.dbms_logmnr.add_logfile(LOGFILENAME => 'I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001', OPTIONS => DBMS_LOGMNR.ADDFILE);END;, OriginalSql = BEGIN sys.dbms_logmnr.add_logfile(LOGFILENAME => 'I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001', OPTIONS => DBMS_LOGMNR.ADDFILE);END;, Error Msg = ORA-01284: file I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001 cannot be opened\nORA-00308: cannot open archived log 'I:\\ORACLE\\ADMIN\\PROD####\\ARCHIVE\\ARC0000668709_0954234303.0001'\nORA-06512: at \"SYS.DBMS_LOGMNR\", line 68\nORA-06512: at line 1\n\n\tat oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)\n\t... 25 more\n"
          }
        ],
        "type": "source"
      }
      

      Attachments

        1. image001.jpg
          image001.jpg
          0.3 kB
        2. image002.png
          image002.png
          0.6 kB
        3. image003.jpg
          image003.jpg
          0.4 kB
        4. image006.jpg
          image006.jpg
          0.3 kB
        5. image007.png
          image007.png
          0.6 kB
        6. image008.jpg
          image008.jpg
          0.4 kB

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: