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

  1. Align the JVM system property value (-Dkey=value) with the connector configuration value, or remove the JVM-level property
  2. Update the connector configuration field so it matches the already-defined system property
  3. 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

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


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/a99e0d0a6bb5d5e1. Report an issue: GitHub.