apache/dolphinscheduler · error · TaskException
Execute Mlflow task failed
Error message
Execute Mlflow task failed
What it means
A catch-all in MlflowTask.handle for non-interrupt failures: the mlflow shell command failed — non-zero exit code (bad mlflow project URI, missing conda env, docker deploy failure in checkDockerHealth), or an I/O error from ShellCommandExecutor. Exit code is set to failure before rethrowing, so the instance reflects the real process outcome.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:125
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
int exitCode;
if (mlflowParameters.getIsDeployDocker()) {
exitCode = checkDockerHealth();
} else {
exitCode = commandExecuteResult.getExitStatusCode();
}
setExitStatusCode(exitCode);
setProcessId(commandExecuteResult.getProcessId());
mlflowParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());
} 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)) {View on GitHub (pinned to 02eac45a1b)
Solutions
- Read the task log for mlflow CLI stderr — it names the project/env/docker failure
- Verify mlflow is installed on the worker and the mlflowTrackingUri is reachable
- For docker deploys, check checkDockerHealth logs and docker daemon availability on the worker
- Fix the mlflow project parameters (experimentName, modelName, params) and re-run
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:125 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/ba767c253d1a7573.
Report an issue: GitHub.