apache/seatunnel · error · IllegalArgumentException
SeaTunnel job on flink engine deploy mode only support…
Error message
SeaTunnel job on flink engine deploy mode only support these options: [run, run-application]
What it means
IllegalArgumentException thrown by FlinkCommandArgs' DeployModeConverter.convert when the -d/--deploy-mode CLI argument is not one of the supported Flink deploy modes (run, run-application). The value must map to the DeployMode enum and be present in DEPLOY_MODE_TYPE_LIST.
Solutions
- Use --deploy-mode run or --deploy-mode run-application
- Check `--help` output for accepted deploy modes
- Remove the flag entirely if the default mode is acceptable
Example fix
# before --deploy-mode cluster # after --deploy-mode run
Defensive patterns
Strategy: validation
Validate before calling
Set<String> allowed = Set.of("run", "run-application");
if (!allowed.contains(deployModeArg)) {
throw new IllegalArgumentException("Unsupported --deploy-mode: " + deployModeArg);
} Try / catch
try {
args = FlinkCommandArgsBuilder.build(rawArgs);
} catch (IllegalArgumentException e) {
System.err.println("Invalid --deploy-mode: " + e.getMessage());
} Prevention
- Use only run / run-application for Flink deployments
- Do not reuse Spark deploy-mode flags in Flink client scripts
- Validate CLI args in wrapper scripts before invoking the client
When it happens
Trigger: Running the Flink starter client with e.g. `--deploy-mode cluster` or `--deploy-mode client` — valid for Spark but not for this Flink converter — causing the membership check to fail after enum parsing.
Common situations: Reusing Spark client flags on the Flink client; typos like 'runapplication'; outdated scripts referencing removed modes.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- SeaTunnel job on flink engine submitted target only support…
- Agent is running (pid file ); stop the agent before write…
- All candidate sink tables were skipped in Flink starter.
- All candidate sink tables were skipped in Flink starter.
- checkpoint.interval is set to
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/114fcab1ac009215.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/args/FlinkCommandArgs.java:132
}
}
}
public static class FlinkDeployModeConverter implements IStringConverter<DeployMode> {
private static final List<DeployMode> DEPLOY_MODE_TYPE_LIST = new ArrayList<>();
static {
DEPLOY_MODE_TYPE_LIST.add(DeployMode.RUN);
DEPLOY_MODE_TYPE_LIST.add(DeployMode.RUN_APPLICATION);
}
@Override
public DeployMode convert(String value) {
DeployMode deployMode = DeployMode.valueOf(value.toUpperCase().replaceAll("-", "_"));
if (DEPLOY_MODE_TYPE_LIST.contains(deployMode)) {
return deployMode;
} else {
throw new IllegalArgumentException(
"SeaTunnel job on flink engine deploy mode only "
+ "support these options: [run, run-application]");
}
}
}
}
View on GitHub (pinned to cf67b549a7)