{"record":{"id":"ba767c253d1a7573","repo":"apache/dolphinscheduler","slug":"execute-mlflow-task-failed","errorCode":null,"errorMessage":"Execute Mlflow task failed","messagePattern":"Execute Mlflow task failed","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java","lineNumber":125,"sourceCode":"            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n            int exitCode;\n            if (mlflowParameters.getIsDeployDocker()) {\n                exitCode = checkDockerHealth();\n            } else {\n                exitCode = commandExecuteResult.getExitStatusCode();\n            }\n            setExitStatusCode(exitCode);\n            setProcessId(commandExecuteResult.getProcessId());\n            mlflowParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current Mlflow task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current Mlflow task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"Mlflow task error\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"Execute Mlflow task failed\", e);\n        }\n    }\n\n    @Override\n    public void cancel() throws TaskException {\n        // cancel process\n        try {\n            shellCommandExecutor.cancelApplication();\n        } catch (Exception e) {\n            throw new TaskException(\"cancel application error\", e);\n        }\n    }\n\n    public String buildCommand() {\n        String command = \"\";\n        if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS)) {\n            command = buildCommandForMlflowProjects();\n        } else if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_MODELS)) {","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java#L107-L143","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}