apache/dolphinscheduler · error · TaskException

cancel application error

Error message

cancel application error

What it means

ShellCommandExecutor.cancelApplication() threw while killing the beeline/hive CLI process during task cancellation — the process may already be dead, the kill signal undeliverable, or the task's execute directory unavailable. A cancellation-path failure only; wrapping in TaskException preserves the underlying cause for the kill audit trail.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java:178

        String command = String.join(" ", args);
        log.info("hiveCli task command: {}", command);

        return command;

    }

    @Override
    public AbstractParameters getParameters() {
        return hiveCliParameters;
    }

    @Override
    public void cancelApplication() throws TaskException {
        try {
            shellCommandExecutor.cancelApplication();
        } catch (Exception e) {
            throw new TaskException("cancel application error", e);
        }
    }

    protected String generateSqlScriptFile(String rawScript) {
        String scriptFileName = String.format("%s/%s_node.sql", taskRequest.getExecutePath(),
                taskRequest.getTaskAppId());

        File file = new File(scriptFileName);
        Path path = file.toPath();

        if (!Files.exists(path)) {
            String script = rawScript.replaceAll("\\r\\n", "\n");

            Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X);
            FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms);
            try {
                if (OSUtils.isWindows()) {
                    Files.createFile(path);

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Inspect the caused-by exception; already-terminated processes can be treated as best-effort cancellation
  2. Manually kill the lingering beeline process by the PID recorded in the task log
  3. Check worker permissions on the task execute directory
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java:178 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/ecbd0fe911e510d5. Report an issue: GitHub.