apache/seatunnel · error · IllegalArgumentException
Deploy mode not supported
Error message
Deploy mode ${deployMode} not supported What it means
The common SparkStarter.getInstance (spark-starter-common) chooses between ClusterModeSparkStarter and ClientModeSparkStarter based on deploy mode; any other deploy-mode value throws an IllegalArgumentException 'Deploy mode <x> not supported'.
Solutions
- Set deploy-mode to exactly 'cluster' or 'client'
- Check invoking scripts/CI for the value actually passed
- Use spark-submit directly for deploy modes the starter doesn't support
Example fix
// before sh bin/seatunnel.sh --deploy-mode local --config job.conf // after sh bin/seatunnel.sh --deploy-mode cluster --config job.conf
Defensive patterns
Strategy: validation
Validate before calling
String mode = commandArgs.getDeployMode();
if (!"cluster".equals(mode) && !"client".equals(mode)) {
throw new IllegalArgumentException("Unsupported deploy mode: " + mode);
} Try / catch
try {
SparkStarter.getInstance(args, commandArgs);
} catch (IllegalArgumentException e) {
log.error("Valid deploy modes: cluster, client", e);
} Prevention
- Validate deploy-mode in wrapper scripts before invoking the starter
- Restrict automation to the two supported values
- Use native spark-submit for unsupported modes (e.g. k8s)
When it happens
Trigger: Spark job submission with a deploy-mode value outside {cluster, client}, such as a typo, wrong case, or an unsupported value passed via command args.
Common situations: Typo in --deploy-mode in launch scripts; Kubernetes deploy modes passed to the standard starter; automation tools injecting defaults like 'local'.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Deploy mode not supported
- All candidate sink tables were skipped in Spark starter.
- All candidate sink tables were skipped in Spark starter.
- API-09
- deploy mode not support
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2582a4a6caed0dba.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java:104
/**
* method to get SparkStarter instance, will return {@link ClusterModeSparkStarter} or {@link
* ClientModeSparkStarter} depending on deploy mode.
*/
static SparkStarter getInstance(String[] args) {
SparkCommandArgs commandArgs =
CommandLineUtils.parse(
args,
new SparkCommandArgs(),
EngineType.SPARK3.getStarterShellName(),
true);
DeployMode deployMode = commandArgs.getDeployMode();
switch (deployMode) {
case CLUSTER:
return new ClusterModeSparkStarter(args, commandArgs);
case CLIENT:
return new ClientModeSparkStarter(args, commandArgs);
default:
throw new IllegalArgumentException("Deploy mode " + deployMode + " not supported");
}
}
@Override
public List<String> buildCommands() throws IOException {
setSparkConf();
Common.setDeployMode(commandArgs.getDeployMode());
Common.setStarter(true);
this.jars.addAll(Common.getLibJars());
this.jars.addAll(getConnectorJarDependencies());
this.jars.addAll(
new ArrayList<>(
Common.getThirdPartyJars(
sparkConf.getOrDefault(EnvCommonOptions.JARS.key(), ""))));
// TODO: override job name in command args, because in spark cluster deploy mode
// command-line arguments are read first
// if user has not specified job with command line, the job name config in file will not
// workView on GitHub (pinned to cf67b549a7)