apache/dolphinscheduler · error · TaskException

cancel application error

Error message

cancel application error

What it means

ShellCommandExecutor.cancelApplication() threw while killing the mlflow process during task cancellation — process already gone, kill signal undeliverable, or execute directory issues. A cancellation-path failure only; wrapping in TaskException preserves the cause for the kill audit trail.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:135

        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            log.error("The current Mlflow task has been interrupted", e);
            setExitStatusCode(EXIT_CODE_FAILURE);
            throw new TaskException("The current Mlflow task has been interrupted", e);
        } catch (Exception e) {
            log.error("Mlflow task error", e);
            setExitStatusCode(EXIT_CODE_FAILURE);
            throw new TaskException("Execute Mlflow task failed", e);
        }
    }

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

    public String buildCommand() {
        String command = "";
        if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS)) {
            command = buildCommandForMlflowProjects();
        } else if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_MODELS)) {
            command = buildCommandForMlflowModels();
        }
        log.info("mlflow task command: \n{}", command);
        return command;
    }

    /**
     * create command
     *
     * @return file name

View on GitHub (pinned to 02eac45a1b)

Solutions

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

Strategy: try-catch

When it happens

Trigger: Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:135 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/090a4228530bf719. Report an issue: GitHub.