{"record":{"id":"962af3d6c4f6fb40","repo":"apache/seatunnel","slug":"set-restart-strategy-in-config-exception","errorCode":null,"errorMessage":"set restart.strategy in config '{}' exception","messagePattern":"set restart\\.strategy in config '(.+?)' exception","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/utils/EnvironmentUtil.java","lineNumber":73,"sourceCode":"                    case \"failure-rate\":\n                        long failureInterval =\n                                config.getLong(ConfigKeyName.RESTART_FAILURE_INTERVAL);\n                        int rate = config.getInt(ConfigKeyName.RESTART_FAILURE_RATE);\n                        long delayInterval = config.getLong(ConfigKeyName.RESTART_DELAY_INTERVAL);\n                        executionConfig.setRestartStrategy(\n                                RestartStrategies.failureRateRestart(\n                                        rate,\n                                        Time.of(failureInterval, TimeUnit.MILLISECONDS),\n                                        Time.of(delayInterval, TimeUnit.MILLISECONDS)));\n                        break;\n                    default:\n                        log.warn(\n                                \"set restart.strategy failed, unknown restart.strategy [{}],only support no,fixed-delay,failure-rate\",\n                                restartStrategy);\n                }\n            }\n        } catch (Exception e) {\n            log.warn(\"set restart.strategy in config '{}' exception\", config, e);\n        }\n    }\n\n    public static CheckResult checkRestartStrategy(Config config) {\n        if (hasPathAndWaring(config, ConfigKeyName.RESTART_STRATEGY)) {\n            String restartStrategy = config.getString(ConfigKeyName.RESTART_STRATEGY);\n            switch (restartStrategy.toLowerCase()) {\n                case \"fixed-delay\":\n                    if (!(config.hasPath(ConfigKeyName.RESTART_ATTEMPTS)\n                            && config.hasPath(ConfigKeyName.RESTART_DELAY_BETWEEN_ATTEMPTS))) {\n                        return CheckResult.error(\n                                String.format(\n                                        \"fixed-delay restart strategy must set [%s],[%s]\",\n                                        ConfigKeyName.RESTART_ATTEMPTS,\n                                        ConfigKeyName.RESTART_DELAY_BETWEEN_ATTEMPTS));\n                    }\n                    break;\n                case \"failure-rate\":","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/utils/EnvironmentUtil.java#L55-L91","documentation":"This catch-all warning in EnvironmentUtil.setRestartStrategy fires when any exception is thrown while applying the restart strategy configuration (e.g. missing numeric sub-options, NumberFormatException from bad values, or wrong config types). The exception is logged with the full config object and swallowed, so the job continues with Flink's default restart behavior.","triggerScenarios":"restart.strategy is a valid name but its sub-options are missing/malformed (e.g. restart.strategy.fixed-delay.delay not a number), or the Config object access throws while reading those keys.","commonSituations":"Forgetting required delay/interval fields when specifying fixed-delay or failure-rate; entering durations with unit suffixes ('10 s') where milliseconds are expected; config type mismatches after hand edits.","solutions":["Add all required sub-options for the chosen strategy as plain numbers (milliseconds/counts).","Check the logged stack trace under this warning to see the exact parse error.","Validate the env block keys against the documented restart-strategy option names."],"exampleFix":"// before\nenv {\n  restart.strategy = \"fixed-delay\"\n  restart.strategy.fixed-delay.delay = \"10 s\"\n}\n// after\nenv {\n  restart.strategy = \"fixed-delay\"\n  restart.strategy.fixed-delay.delay = 10000\n  restart.strategy.fixed-delay.attempts = 3\n}","handlingStrategy":"validation","validationCode":"// ensure numeric sub-options parse before submission\nlong delay = config.getLong(\"restart.strategy.fixed-delay.delay\");\nint attempts = config.getInt(\"restart.strategy.fixed-delay.attempts\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provide strategy sub-options as plain integers (milliseconds/counts), no unit suffixes.","Cross-check required keys per strategy type before submitting.","Keep a validated example env block as a template."],"tags":["flink","config","restart-strategy"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}