apache/seatunnel · error · RuntimeException
Read the redoLog offset error
Error message
Read the redoLog offset error
What it means
RedoLogOffsetFactory.latest() opens a JDBC connection to the Oracle database and reads the current SCN (redo log offset) via OracleConnectionUtils.currentRedoLogOffset. Any exception during connection setup or the SCN query is rethrown as a plain RuntimeException wrapping the original cause. It signals that the connector could not determine the starting position for redo log (CDC) reading.
Solutions
- Verify connection parameters (hostname, port, service name, username, password) in the Oracle CDC source config
- Test connectivity with a plain SQL client using the same credentials: SELECT CURRENT_SCN FROM V$DATABASE
- Grant the log-mining privileges required by Debezium/LogMiner to the CDC user
- Check the wrapped cause (e.getCause()) in the stack trace for the root JDBC error
Example fix
// before
Offset offset = offsetFactory.latest(); // opaque RuntimeException
// after
try {
Offset offset = offsetFactory.latest();
} catch (RuntimeException e) {
LOG.error("Failed to read redo log offset; cause: " + e.getCause(), e);
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
// Verify connectivity before starting CDC
try (Connection c = DriverManager.getConnection(jdbcUrl, user, pass);
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT CURRENT_SCN FROM V$DATABASE")) {
if (!rs.next()) throw new IllegalStateException("No SCN returned");
} Try / catch
try {
Offset offset = factory.latest();
} catch (RuntimeException e) {
// inspect e.getCause() for the JDBC/ORA root error
LOG.error("redo log offset read failed: {}", e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
throw e;
} Prevention
- Validate JDBC credentials and URL with a SQL client before submitting the job
- Grant all required LogMiner/V$ privileges to the CDC user up front
- Ensure network/firewall allows the Oracle listener port
- Include database host/port/user context in your logging for diagnosis
When it happens
Trigger: Calling RedoLogOffsetFactory.latest() when the Oracle host/port is unreachable, credentials are wrong, the user lacks privileges on V$DATABASE, or the underlying SELECT CURRENT_SCN query throws a SQLException.
Common situations: Misconfigured hostname/port in source config; wrong username/password; Oracle user missing log-mining privileges (LOGMINING, SELECT ANY TRANSACTION); database in a restricted/unmounted state; network/firewall blocking the listener.
Understand the failure class
Background: "query failed", "%w: SQL error" — wrapped database query errors in Go libraries explained — this error's family across 3 libraries.
Related errors
- Convert timestamp to redoLog offset error
- not supported create new Offset by filename and position.
- Cannot convert timestamp to SCN. Make sure the specified…
- Cannot read the redo log position via 'SELECT CURRENT_SCN…
- Error reading oracle variables
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ec7ee76354a9952a.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/source/offset/RedoLogOffsetFactory.java:60
this.dialect = dialect;
}
@Override
public Offset earliest() {
return RedoLogOffset.INITIAL_OFFSET;
}
@Override
public Offset neverStop() {
return RedoLogOffset.NO_STOPPING_OFFSET;
}
@Override
public Offset latest() {
try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {
return OracleConnectionUtils.currentRedoLogOffset(jdbcConnection);
} catch (Exception e) {
throw new RuntimeException("Read the redoLog offset error", e);
}
}
@Override
public Offset specific(Map<String, String> offset) {
return new RedoLogOffset(offset);
}
@Override
public Offset specific(String filename, Long position) {
throw new UnsupportedOperationException(
"not supported create new Offset by filename and position.");
}
@Override
public Offset timestamp(long timestamp) {
try (JdbcConnection jdbcConnection = dialect.openJdbcConnection(sourceConfig)) {
return OracleConnectionUtils.timestampToScn(View on GitHub (pinned to cf67b549a7)