{"record":{"id":"f2cb702e8fa6e06b","repo":"apache/seatunnel","slug":"mysql-cdc-diagnostic-debezium-connection-target-h","errorCode":null,"errorMessage":"MySQL-CDC diagnostic: debezium connection target host={}, port={}","messagePattern":"MySQL-CDC diagnostic: debezium connection target host=(.+?), port=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java","lineNumber":425,"sourceCode":"                LOG.warn(\"Some of the GTIDs needed to replicate have been already purged\");\n                logGtidNotAvailableDiagnostics(offset);\n                return false;\n            }\n            return true;\n        }\n        LOG.info(\"Connector last known GTIDs are {}, but MySQL has {}\", gtidSet, availableGtidSet);\n        logGtidNotAvailableDiagnostics(offset);\n        return false;\n    }\n\n    private void logBinlogNotAvailableDiagnostics(\n            String requiredBinlogFilename,\n            List<String> availableBinlogFiles,\n            MySqlOffsetContext offset) {\n        LOG.warn(\n                \"MySQL-CDC diagnostic: requested starting offset sourceInfo={}\",\n                offset.getSourceInfo());\n        LOG.warn(\n                \"MySQL-CDC diagnostic: debezium connection target host={}, port={}\",\n                getDbzConnectorConfig().hostname(),\n                getDbzConnectorConfig().port());\n\n        logMySqlServerIdentity();\n        logMySqlBinlogRetentionVariables();\n        logMySqlMasterStatus();\n        logMySqlReplicationStatus();\n        logBinlogRangeAnalysis(requiredBinlogFilename, availableBinlogFiles);\n    }\n\n    private void logGtidNotAvailableDiagnostics(MySqlOffsetContext offset) {\n        LOG.warn(\n                \"MySQL-CDC diagnostic: GTID set is not available on server for restored offset. restored_gtid_set={}, sourceInfo={}\",\n                offset.gtidSet(),\n                offset.getSourceInfo());\n        LOG.warn(\n                \"MySQL-CDC diagnostic: debezium connection target host={}, port={}\",","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java#L407-L443","documentation":"A companion diagnostic warning in logBinlogNotAvailableDiagnostics() that prints the Debezium connection target hostname and port when the required binlog file was not found on the server. It helps confirm the connector is actually talking to the MySQL instance the operator thinks it is.","triggerScenarios":"Same path as 3158: checkBinlogFilename() finds the required binlog unavailable and calls logBinlogNotAvailableDiagnostics(), which logs getDbzConnectorConfig().hostname() and .port().","commonSituations":"Discovering that the job is pointed at a replica or stale host; misconfigured host/port; DNS round-robin landing on a different server than the checkpoint came from.","solutions":["Compare the logged host/port with the intended MySQL server in the job config.","Fix the hostname/port in the source config if a replica or wrong instance was targeted.","Ensure any load balancer/DNS entry resolves to the primary that holds the binlogs.","Then address the underlying missing-binlog problem (retention or re-snapshot)."],"exampleFix":"// before\nhostname = \"mysql-replica.internal\"\n// after\nhostname = \"mysql-primary.internal\"","handlingStrategy":"validation","validationCode":"-- Confirm which server the connector hit:\nSELECT @@hostname, @@server_id, @@server_uuid;\n-- Compare with the host/port in the diagnostic log line.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the CDC source to the primary host (no round-robin DNS) in configs","Verify host/port in the source options before resuming checkpoints","Check the diagnostic's host/port against your intended topology"],"tags":["mysql","binlog","diagnostics","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}