{"record":{"id":"159771266975a3d7","repo":"apache/seatunnel","slug":"system-or-jvm-property-property-is-already-de","errorCode":null,"errorMessage":"System or JVM property '${property}' is already defined, but the configuration property '${field.name()}' defines a different value' (or, when showValueInError: 'System or JVM property '${property}' is already defined as ${existingValue}, but the configuration property '${field.name()}' defines a different value '${value}'')","messagePattern":"System or JVM property '(.+?)' is already defined, but the configuration property '(.+?)' defines a different value' \\(or, when showValueInError: 'System or JVM property '(.+?)' is already defined as (.+?), but the configuration property '(.+?)' defines a different value '(.+?)''\\)","errorType":"exception","errorClass":"ConnectException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/legacy/MySqlJdbcContext.java","lineNumber":530,"sourceCode":"                    String msg =\n                            \"System or JVM property '\"\n                                    + property\n                                    + \"' is already defined, but the configuration property '\"\n                                    + field.name()\n                                    + \"' defines a different value\";\n                    if (showValueInError) {\n                        msg =\n                                \"System or JVM property '\"\n                                        + property\n                                        + \"' is already defined as \"\n                                        + existingValue\n                                        + \", but the configuration property '\"\n                                        + field.name()\n                                        + \"' defines a different value '\"\n                                        + value\n                                        + \"'\";\n                    }\n                    throw new ConnectException(msg);\n                }\n                // Otherwise, there was an existing property, and the value is exactly the same (so\n                // do nothing!)\n            }\n        }\n    }\n\n    /**\n     * Read the Ssl Version session variable.\n     *\n     * @return the session variables that are related to sessions ssl version\n     */\n    public String getSessionVariableForSslVersion() {\n        final String SSL_VERSION = \"Ssl_version\";\n        logger.debug(\"Reading MySQL Session variable for Ssl Version\");\n        Map<String, String> sessionVariables =\n                querySystemVariables(SQL_SHOW_SESSION_VARIABLE_SSL_VERSION);\n        if (!sessionVariables.isEmpty() && sessionVariables.containsKey(SSL_VERSION)) {","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/legacy/MySqlJdbcContext.java#L512-L548","documentation":"MySqlJdbcContext.setSystemProperty applies configuration fields that map to JVM/system properties (e.g. time zone settings). If the system property is already set with a value that differs from the one defined in the connector configuration, the connector refuses to proceed and throws a ConnectException, because the conflicting value would silently change behavior. When the same value is already set, it is a no-op.","triggerScenarios":"Calling setSystemProperty during connector task initialization when a field-backed property (e.g. database.serverTimezone) is already defined via -D JVM flags, System.setProperty, or the container/JVM environment with a different value than the config.","commonSituations":"Operator sets -Duser.timezone=UTC on the JVM while the connector config specifies a different serverTimezone; Kafka Connect worker properties predefine the property; duplicated configuration between worker and connector levels.","solutions":["Align the system property value with the connector configuration value (or remove the -D flag so the config value wins).","Alternatively update the connector config to match the already-set system property.","Check worker/agent startup scripts and java options for duplicate definitions of the same property.","Restart the process after fixing so the JVM picks up a single consistent value."],"exampleFix":"// before (JVM flags)\njava -Duser.timezone=Asia/Shanghai ... // config says UTC\n// after\njava -Duser.timezone=UTC ... // matches config value 'UTC'","handlingStrategy":"validation","validationCode":"// Detect conflicting JVM property before connector init\nString prop = System.getProperty(\"user.timezone\");\nif (prop != null && !prop.equals(configTimezone)) {\n    throw new IllegalStateException(\"Conflicting system property user.timezone=\" + prop);\n}","typeGuard":null,"tryCatchPattern":"try { engine.start(); } catch (ConnectException e) { if (e.getMessage().contains(\"already defined\")) { logger.error(\"Remove conflicting -D flag or align config value\"); } throw e; }","preventionTips":["Audit JVM startup flags (-D) for properties also managed by connector config.","Keep timezone settings in exactly one place (JVM or connector config, not both).","Document worker-level java options so connector configs don't duplicate them."],"tags":["configuration","jvm","conflict","cdc"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}