{"record":{"id":"e51b17311f447229","repo":"apache/seatunnel","slug":"not-supported-cluster-role-clusterrole","errorCode":null,"errorMessage":"Not supported cluster role: ${clusterRole}","messagePattern":"Not supported cluster role: (.+?)","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java","lineNumber":75,"sourceCode":"    public void execute() {\n        checkEnvironment();\n        SeaTunnelConfig seaTunnelConfig = ConfigProvider.locateAndGetSeaTunnelConfig();\n        if (this.serverCommandArgs.isShowClusterMembers()) {\n            showClusterMembers();\n            return;\n        }\n\n        String clusterRole = this.serverCommandArgs.getClusterRole();\n        if (StringUtils.isNotBlank(clusterRole)) {\n            if (EngineConfig.ClusterRole.MASTER.toString().equalsIgnoreCase(clusterRole)) {\n                seaTunnelConfig.getEngineConfig().setClusterRole(EngineConfig.ClusterRole.MASTER);\n            } else if (EngineConfig.ClusterRole.WORKER.toString().equalsIgnoreCase(clusterRole)) {\n                seaTunnelConfig.getEngineConfig().setClusterRole(EngineConfig.ClusterRole.WORKER);\n\n                // in hazelcast lite node will not store IMap data.\n                seaTunnelConfig.getHazelcastConfig().setLiteMember(true);\n            } else {\n                throw new SeaTunnelEngineException(\"Not supported cluster role: \" + clusterRole);\n            }\n        } else {\n            seaTunnelConfig\n                    .getEngineConfig()\n                    .setClusterRole(EngineConfig.ClusterRole.MASTER_AND_WORKER);\n        }\n\n        SeaTunnelServerStarter.createHazelcastInstance(\n                seaTunnelConfig, Thread.currentThread().getName());\n    }\n\n    private void checkEnvironment() {\n        if (isAllocatingThreadGetName()) {\n            log.warn(\n                    \"The current JDK version is not recommended. Please upgrade to JDK 1.8.0_102 or higher. \"\n                            + \"The current version will affect the performance of log printing. \"\n                            + \"For details, please refer to https://issues.apache.org/jira/browse/LOG4J2-2052\");\n        }","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java#L57-L93","documentation":"When starting a SeaTunnel cluster node, the `--role` (cluster role) argument must be one of master, worker, or master_and_worker. ServerExecuteCommand.execute maps the role string onto EngineConfig.ClusterRole and throws SeaTunnelEngineException for any other value. If no role is given it safely defaults to MASTER_AND_WORKER, so this error only occurs on an explicitly wrong value.","triggerScenarios":"Starting a server node with `seatunnel-cluster.sh -r <value>` where <value> is not master/worker/master_and_worker (case-insensitive), e.g. `-r node` or `-r slave`.","commonSituations":"Copy-pasted startup scripts from older SeaTunnel versions that used different role names, typos like `workes`, or custom orchestration scripts passing an unsupported role.","solutions":["Use only `-r master`, `-r worker`, or `-r master_and_worker` when starting the cluster","Omit the `-r` flag entirely to run a combined master+worker node","Update legacy deployment scripts that use old role names from previous SeaTunnel versions","Check `seatunnel-cluster.sh --help` for the accepted role values in your version"],"exampleFix":"// before\nsh bin/seatunnel-cluster.sh -r slave\n// after\nsh bin/seatunnel-cluster.sh -r worker","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"master\", \"worker\", \"master_and_worker\");\nif (clusterRole != null && !valid.contains(clusterRole.toLowerCase())) {\n    throw new IllegalArgumentException(\"-r must be master|worker|master_and_worker\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    command.execute(serverCommandArgs);\n} catch (SeaTunnelEngineException e) {\n    if (e.getMessage().startsWith(\"Not supported cluster role\")) {\n        log.error(\"Use -r master|worker|master_and_worker\");\n    }\n}","preventionTips":["Only use documented -r values","Omit -r for combined master+worker dev nodes","Keep deployment scripts updated across SeaTunnel upgrades","Check `seatunnel-cluster.sh --help` before scripting"],"tags":["cli","cluster","startup","seatunnel-core"],"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-14T05:17:10.506Z"}