apache/seatunnel · info
MySQL-CDC diagnostic: connected to MySQL hostname={}, port={
Error message
MySQL-CDC diagnostic: connected to MySQL hostname={}, port={}, server_id={}, server_uuid={}, read_only={}, super_read_only={}, version={}, gtid_mode={} What it means
Diagnostic WARN from logMySqlServerIdentity that runs a query (SELECT of hostname, port, server_id, server_uuid, read_only, super_read_only, version, gtid_mode, typically via information_schema / @@variables) and logs the connected server's identity. It is invoked when binlog or GTID availability checks fail, letting developers verify which server they are actually talking to and in what mode it runs.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java:465
logMySqlBinlogRetentionVariables();
logMySqlMasterStatus();
logMySqlReplicationStatus();
}
private void logMySqlServerIdentity() {
final String sql =
"SELECT @@hostname AS hostname, @@port AS port, @@server_id AS server_id, "
+ "@@server_uuid AS server_uuid, @@read_only AS read_only, "
+ "@@super_read_only AS super_read_only, @@version AS version, "
+ "@@gtid_mode AS gtid_mode";
try {
connection.query(
sql,
rs -> {
if (!rs.next()) {
return;
}
LOG.warn(
"MySQL-CDC diagnostic: connected to MySQL hostname={}, port={}, server_id={}, server_uuid={}, read_only={}, super_read_only={}, version={}, gtid_mode={}",
rs.getString("hostname"),
rs.getString("port"),
rs.getString("server_id"),
rs.getString("server_uuid"),
rs.getString("read_only"),
rs.getString("super_read_only"),
rs.getString("version"),
rs.getString("gtid_mode"));
});
} catch (SQLException e) {
LOG.warn(
"MySQL-CDC diagnostic: failed to query MySQL server identity: {}",
e.getMessage());
}
}
private void logMySqlBinlogRetentionVariables() {View on GitHub (pinned to cf67b549a7)
Solutions
- Read the logged server_uuid/host to confirm connection target; if unexpected, fix connection config
- If gtid_mode is not ON but the job requires GTID, enable GTID on the server
- If read_only/super_read_only indicates a replica, decide whether reading from a replica is intended and ensure it forwards binlogs/GTIDs
Example fix
// before SHOW VARIABLES LIKE 'gtid_mode'; -- OFF // after SET @@GLOBAL.enforce_gtid_consistency=ON; SET @@GLOBAL.gtid_mode=OFF_PERMISSIVE; -- step to ON_PERMISSIVE then ON (restart may be required)
Defensive patterns
Strategy: validation
Validate before calling
SELECT @@server_id, @@server_uuid, @@read_only, @@super_read_only, @@version, @@gtid_mode;
Prevention
- Pre-flight check gtid_mode/version/read_only before every job start
- Ensure CDC user can read system variables
- Document expected source identity (uuid) and alert on drift
When it happens
Trigger: Called by logBinlogNotAvailableDiagnostics or logGtidNotAvailableDiagnostics whenever binlog or GTID availability validation fails for the restored offset; emitted once per diagnostic run when the identity query returns a row.
Common situations: Investigating why a restart fails: confirming gtid_mode is OFF, the server is read_only/super_read_only (a replica), or the version is too old for required binlog features.
Understand the failure class
Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.
Related errors
- MySQL-CDC diagnostic: GTID set is not available on server fo
- MySQL-CDC diagnostic: failed to query MySQL server identity:
- MySQL-CDC diagnostic: variable {} not found
- MySQL-CDC diagnostic: variable {}={}
- MySQL-CDC diagnostic: failed to query variable {}: {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1dfaf7902ce30ed9.
Report an issue: GitHub.