apache/seatunnel · error · DebeziumException
Cannot read the binlog filename and position via '<showMaste
Error message
Cannot read the binlog filename and position via '<showMasterStmt>'. Make sure your server is correctly configured
What it means
determineSnapshotOffset() executes showMasterStmt (SHOW MASTER STATUS, or SHOW SLAVE STATUS/replica variants for replicas) and expects at least one row with the current binlog file and position. If the result set is empty, it throws this DebeziumException, meaning the server did not report a binlog position at snapshot start. Usually the server has binlogging disabled or the user lacks the privilege to see it.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlSnapshotChangeEventSource.java:373
// This column exists only in MySQL 5.6.5 or later ...
final String gtidSet =
rs.getString(
5); // GTID set, may be null, blank, or contain a GTID
// set
offsetContext.setCompletedGtidSet(gtidSet);
LOGGER.info(
"\t using binlog '{}' at position '{}' and gtid '{}'",
binlogFilename,
binlogPosition,
gtidSet);
} else {
LOGGER.info(
"\t using binlog '{}' at position '{}'",
binlogFilename,
binlogPosition);
}
} else {
throw new DebeziumException(
"Cannot read the binlog filename and position via '"
+ showMasterStmt
+ "'. Make sure your server is correctly configured");
}
});
tryStartingSnapshot(ctx);
}
private void addSchemaEvent(
RelationalSnapshotContext<MySqlPartition, MySqlOffsetContext> snapshotContext,
String database,
String ddl) {
schemaEvents.addAll(
databaseSchema.parseSnapshotDdl(
snapshotContext.partition,
ddl,
database,
snapshotContext.offset,View on GitHub (pinned to cf67b549a7)
Solutions
- Enable binlogging on the server: set log_bin=ON (MySQL 8 enables it by default; 5.7 needs a log-bin config) and restart.
- Grant the CDC user REPLICATION CLIENT (and REPLICATION SLAVE): GRANT REPLICATION CLIENT ON *.* TO 'user'@'%';
- Run 'SHOW MASTER STATUS' (or SHOW BINARY LOG STATUS on 8.4+) with the same credentials to confirm a row is returned.
- On managed MySQL (RDS), enable automated backups / binlog retention: call mysql.rds_set_configuration('binlog retention hours', 24).
- If snapshotting from a replica, ensure the replica has its own binlogs (log_bin=ON, log_slave_updates=ON) or snapshot from the primary.
Example fix
-- before: my.cnf (binlog off) # no log-bin setting -- after [mysqld] log_bin = mysql-bin binlog_format = ROW server_id = 1 -- plus privileges GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'stuser'@'%';
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight check with the exact CDC credentials: // mysql -u stuser -p -h <host> -e "SHOW MASTER STATUS;" // A one-row result means the snapshot offset can be determined. // On MySQL 8.4+ use: SHOW BINARY LOG STATUS;
Try / catch
try {
startCdcJob();
} catch (DebeziumException e) {
if (e.getMessage().startsWith("Cannot read the binlog filename and position")) {
// enable binlog (log_bin=ON) and grant REPLICATION CLIENT, then rerun
} else {
throw e;
}
} Prevention
- Confirm log_bin is ON and 'SHOW MASTER STATUS' returns a row before configuring CDC.
- Grant REPLICATION CLIENT and REPLICATION SLAVE to the CDC user on *.*.
- On RDS/Aurora enable automated backups and set binlog retention hours.
- Ensure replicas used for snapshotting have log_bin and log_slave_updates enabled.
When it happens
Trigger: Calling determineSnapshotOffset() with no previous offset when 'SHOW MASTER STATUS' returns an empty result — i.e. log_bin=OFF on the server, binlog disabled on the replica, or the account lacks REPLICATION CLIENT so MySQL hides the binlog status row.
Common situations: Fresh MySQL installs where log_bin is not enabled; Docker MySQL images without --log-bin; RDS instances with automated backups disabled (binlog off); CDC user created without REPLICATION CLIENT; pointing the connector at a replica that has log_slave_updates/binlogs disabled.
Related errors
- Unexpected error while connecting to MySQL and looking at gt
- Unexpected error while connecting to MySQL and looking for b
- Unexpected error while connecting to MySQL and looking at BI
- Unexpected error while connecting to MySQL and looking at BI
- Interrupted while emitting initial DROP TABLE events
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ba112ede6fabc256.
Report an issue: GitHub.