{"record":{"id":"47a9ebabd2033509","repo":"apache/seatunnel","slug":"deploy-mode-deploymode-not-supported","errorCode":null,"errorMessage":"Deploy mode ${deployMode} not supported","messagePattern":"Deploy mode (.+?) not supported","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-spark-starter/seatunnel-spark-2-starter/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java","lineNumber":104,"sourceCode":"    /**\n     * method to get SparkStarter instance, will return {@link ClusterModeSparkStarter} or {@link\n     * ClientModeSparkStarter} depending on deploy mode.\n     */\n    static SparkStarter getInstance(String[] args) {\n        SparkCommandArgs commandArgs =\n                CommandLineUtils.parse(\n                        args,\n                        new SparkCommandArgs(),\n                        EngineType.SPARK2.getStarterShellName(),\n                        true);\n        DeployMode deployMode = commandArgs.getDeployMode();\n        switch (deployMode) {\n            case CLUSTER:\n                return new ClusterModeSparkStarter(args, commandArgs);\n            case CLIENT:\n                return new ClientModeSparkStarter(args, commandArgs);\n            default:\n                throw new IllegalArgumentException(\"Deploy mode \" + deployMode + \" not supported\");\n        }\n    }\n\n    @Override\n    public List<String> buildCommands() throws IOException {\n        setSparkConf();\n        Common.setDeployMode(commandArgs.getDeployMode());\n        Common.setStarter(true);\n        this.jars.addAll(Common.getLibJars());\n        this.jars.addAll(getConnectorJarDependencies());\n        this.jars.addAll(\n                new ArrayList<>(\n                        Common.getThirdPartyJars(\n                                sparkConf.getOrDefault(EnvCommonOptions.JARS.key(), \"\"))));\n        // TODO: override job name in command args, because in spark cluster deploy mode\n        // command-line arguments are read first\n        // if user has not specified job with command line, the job name config in file will not\n        // work","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-spark-starter/seatunnel-spark-2-starter/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java#L86-L122","documentation":"This error is thrown by SparkStarter.getInstance when the --deploy-mode argument parsed from the seatunnel.sh command line is neither 'cluster' nor 'client'. It is a guard against unsupported deploy-mode values for the Spark 2 starter; the fix is to pass -DdeployMode=cluster or client when submitting the job.","triggerScenarios":"Submitting a Spark job with --deploy-mode (or env deploy-mode) set to something other than cluster or client, e.g. a typo like 'cluser' or a lowercase/uppercase mismatch.","commonSituations":"Typos in the deploy-mode flag; passing k8s-specific modes not supported by this starter; scripts injecting unexpected default values.","solutions":["Set --deploy-mode to exactly 'cluster' or 'client'","Check for casing/typo errors in scripts or CI pipelines invoking seatunnel.sh","If you need other deploy modes, submit through native spark-submit with the generated SeaTunnel job package"],"exampleFix":"// before\nsh bin/seatunnel.sh --deploy-mode cluser --config job.conf\n// after\nsh bin/seatunnel.sh --deploy-mode client --config job.conf","handlingStrategy":"validation","validationCode":"String mode = System.getProperty(\"deployMode\");\nif (!\"cluster\".equals(mode) && !\"client\".equals(mode)) {\n    throw new IllegalArgumentException(\"deploy-mode must be cluster or client: \" + mode);\n}","typeGuard":null,"tryCatchPattern":"try {\n    SparkStarter.getInstance(args, commandArgs);\n} catch (IllegalArgumentException e) {\n    log.error(\"Use --deploy-mode client|cluster\", e);\n}","preventionTips":["Always pass --deploy-mode client or cluster explicitly","Quote defaults in shell scripts to avoid empty values","Review CI launch scripts for hardcoded deploy modes"],"tags":["spark","deploy-mode","cli-argument"],"backgroundTag":"invalid-enum-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"}