apache/seatunnel · info
The job is running in local mode, can not use async mode.
Error message
The job is running in local mode, can not use async mode.
What it means
In ClientExecuteCommand, when the user passes the async flag (-m async / --async) while the job runs in local mode, the client cannot return early because there is no separate cluster to poll asynchronously. It logs a warning and falls back to synchronous waiting for job completion.
Solutions
- Remove the async flag when using `-e local` mode.
- Run against a real cluster (drop `-e local`) if you want fire-and-forget async submission.
- Treat this as informational: the job still runs, just synchronously.
Example fix
// before sh bin/seatunnel.sh --config job.conf -e local -m run // after: drop async for local mode sh bin/seatunnel.sh --config job.conf -e local
Defensive patterns
Strategy: validation
Validate before calling
# shell pre-check before invoking grep -q -- '-e local' <<< "$ARGS" && grep -q -- '-m run' <<< "$ARGS" && echo 'async flag ignored in local mode'
Prevention
- Never combine `-e local` with the async option in command templates.
- Keep separate command templates for local vs cluster submission.
- Check starter logs for this warning when jobs unexpectedly block the terminal.
When it happens
Trigger: Running `seatunnel.sh --config job.conf -e local -m run` combined with the async CLI flag, i.e. local execution mode plus `-n`/async option enabled.
Common situations: Copy-pasting a cluster-mode command template and adding `-e local` for a quick test while forgetting to remove the async flag.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Agent is running (pid file ); stop the agent before write…
- Cluster name is required. Please specify it using -cn or…
- cluster: is not running, Please start the cluster first.
- Dry-run is only supported via CLI
- Dry-run mode must not be empty.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a3defa0ebcc22a2b.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ClientExecuteCommand.java:232
} else {
jobExecutionEnv =
engineClient.createExecutionContext(
configFile.toString(),
clientCommandArgs.getVariables(),
jobConfig,
seaTunnelConfig,
clientCommandArgs.getCustomJobId() != null
? Long.parseLong(clientCommandArgs.getCustomJobId())
: null);
}
// get job start time
startTime = LocalDateTime.now();
// create job proxy
ClientJobProxy clientJobProxy = jobExecutionEnv.execute();
if (clientCommandArgs.isAsync()) {
if (isLocalMode) {
log.warn("The job is running in local mode, can not use async mode.");
} else {
return;
}
}
// register cancelJob hook
Runtime.getRuntime()
.addShutdownHook(
new Thread(
() -> {
CompletableFuture<Void> future =
CompletableFuture.runAsync(
() -> {
log.info(
"run shutdown hook because get close signal");
shutdownHook(clientJobProxy);
});
try {
future.get(15, TimeUnit.SECONDS);View on GitHub (pinned to cf67b549a7)