apache/seatunnel · critical · SeaTunnelException
Cannot read the binlog filename and position via
Error message
Cannot read the binlog filename and position via '${showMasterStmt}'. Make sure your server is correctly configured What it means
MySqlConnectionUtils.getBinlogOffset executes a SHOW MASTER STATUS (or similar) statement and expects at least one result row. If the result set is empty it throws SeaTunnelException stating the binlog filename/position could not be read via that statement.
Solutions
- Enable binary logging: set log_bin=ON and restart MySQL
- Verify with `SHOW VARIABLES LIKE 'log_bin'` that binlogging is active
- Confirm the connecting user has REPLICATION CLIENT/SLAVE privileges
- On MySQL 8.4+/managed instances, use the supported equivalent command instead of SHOW MASTER STATUS
- If the source should start from earliest, configure the startup mode accordingly and check server capabilities first
Example fix
// my.cnf // before # log_bin disabled // after [mysqld] log_bin = mysql-bin binlog_format = ROW server_id = 1
Defensive patterns
Strategy: validation
Validate before calling
mysql -u seatunnel -p -e "SHOW VARIABLES LIKE 'log_bin'; SHOW MASTER STATUS;" // log_bin must be ON and SHOW MASTER STATUS must return a row
Try / catch
try {
startCdcJob(config);
} catch (Exception e) {
if (e.getMessage().contains("Cannot read the binlog filename")) {
log.error("Binlog disabled or SHOW MASTER STATUS returned no rows");
}
} Prevention
- Enable log_bin with ROW format before starting CDC
- Grant REPLICATION CLIENT and REPLICATION SLAVE
- Check server compatibility (MySQL 8.4 renamed the command)
- Pre-flight check SHOW MASTER STATUS in deployment scripts
When it happens
Trigger: Calling earliestBinlogOffset/currentBinlogOffset (via getBinlogOffset) against a MySQL server whose `SHOW MASTER STATUS` returns no rows — typically when binlogging is disabled.
Common situations: MySQL with log_bin=OFF; replica without binary log; cloud-managed MySQL (e.g. some RDS/Aurora configurations) restricting SHOW MASTER STATUS; GTID-only setups where the statement behaves unexpectedly.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- A deserialization failure event arrived
- Cannot read the binlog filename and position via
- Cannot read the binlog filename and position via
- Encountered change event
- Error during binlog processing. Last offset stored =
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/d9ffb1b3ca0da0d6.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/utils/MySqlConnectionUtils.java:125
return new BinlogOffset(
binlogFilename, binlogPosition, 0L, 0, 0, gtidSet, null);
};
return getBinlogOffset(
jdbc, mySqlConnection.binaryLogStatusStatement(), getCurrentBinlogOffset);
}
private static BinlogOffset getBinlogOffset(
JdbcConnection jdbc,
String showMasterStmt,
JdbcConnection.ResultSetMapper<BinlogOffset> function) {
try {
return jdbc.queryAndMap(
showMasterStmt,
rs -> {
if (rs.next()) {
return function.apply(rs);
} else {
throw new SeaTunnelException(
"Cannot read the binlog filename and position via '"
+ showMasterStmt
+ "'. Make sure your server is correctly configured");
}
});
} catch (SQLException e) {
throw new SeaTunnelException(
"Cannot read the binlog filename and position via '"
+ showMasterStmt
+ "'. Make sure your server is correctly configured",
e);
}
}
// --------------------------------------------------------------------------------------------
private static MySqlValueConverters getValueConverters(MySqlConnectorConfig dbzMySqlConfig) {
TemporalPrecisionMode timePrecisionMode = dbzMySqlConfig.getTemporalPrecisionMode();View on GitHub (pinned to cf67b549a7)