apache/seatunnel · error · DebeziumException
System or JVM property '<property>' is already defined, but
Error message
System or JVM property '<property>' is already defined, but the configuration property '<field.name()>' defines a different value
What it means
MySqlConnection.setSystemProperty applies values from MySqlSystemVariables/connector config into JVM system properties. It throws this DebeziumException when a system or JVM property already exists with a value that differs from the one the configuration field specifies. This guards against silently overriding conflicting settings (e.g. timezone or character-set properties set twice with different values).
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java:233
String msg =
"System or JVM property '"
+ property
+ "' is already defined, but the configuration property '"
+ field.name()
+ "' defines a different value";
if (showValueInError) {
msg =
"System or JVM property '"
+ property
+ "' is already defined as "
+ existingValue
+ ", but the configuration property '"
+ field.name()
+ "' defines a different value '"
+ value
+ "'";
}
throw new DebeziumException(msg);
}
// Otherwise, there was an existing property, and the value is exactly the same (so
// do nothing!)
}
}
}
/**
* Read the Ssl Version session variable.
*
* @return the session variables that are related to sessions ssl version
*/
protected String getSessionVariableForSslVersion() {
final String SSL_VERSION = "Ssl_version";
LOGGER.debug("Reading MySQL Session variable for Ssl Version");
Map<String, String> sessionVariables =
querySystemVariables(SQL_SHOW_SESSION_VARIABLE_SSL_VERSION);
if (!sessionVariables.isEmpty() && sessionVariables.containsKey(SSL_VERSION)) {View on GitHub (pinned to cf67b549a7)
Solutions
- Align the JVM system property value (-Dkey=value) with the connector configuration value, or remove the JVM-level property
- Update the connector configuration field so it matches the already-defined system property
- Decide on one source of truth for the setting and only set it there
Example fix
// before
// JVM: -DcharacterEncoding=latin1, config sets UTF-8
builder.withProperty("characterEncoding", "UTF-8");
// after: make values consistent
// JVM: -DcharacterEncoding=UTF-8
builder.withProperty("characterEncoding", "UTF-8"); Defensive patterns
Strategy: validation
Validate before calling
String existing = System.getProperty("characterEncoding"); if (existing != null && !existing.equals(configValue)) { throw new IllegalStateException("system property characterEncoding=" + existing + " conflicts with config value " + configValue); } Try / catch
try { connection.start(); } catch (DebeziumException e) { if (e.getMessage().contains("is already defined")) { /* resolve conflicting property values */ } } Prevention
- Keep one source of truth: set DB-related settings either in JVM flags or connector config, not both
- Document required -D flags for your deployment
- Audit System.getProperties() for DB keys at startup
When it happens
Trigger: Calling setSystemProperty (during MySqlConnection configuration) when Java system properties contain the same key as a config field (MySqlSystemVariables field) but with a different value.
Common situations: JVM launched with -DserverTimezone=UTC while connector config sets a different timezone; duplicated settings between application properties and connector configuration; environment differs from the documented defaults after an upgrade.
Related errors
- System or JVM property '${property}' is already defined, but
- Subtask ID ${subTaskId} is out of server id range ${this}, p
- Connector used GTIDs previously, but MySQL does not know of
- MySQL-CDC diagnostic: debezium connection target host={}, po
- configured the props named 'changelog-producer' which is not
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a99e0d0a6bb5d5e1.
Report an issue: GitHub.