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

  1. Remove the async flag when using `-e local` mode.
  2. Run against a real cluster (drop `-e local`) if you want fire-and-forget async submission.
  3. 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

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


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)