apache/dolphinscheduler · error · TaskException
run hiveCli task error
Error message
run hiveCli task error
What it means
A catch-all in HiveCliTask.handle: the shell command launching `beeline`/hive CLI failed for a non-interrupt reason — non-zero process exit (bad SQL, connection failure to HiveServer2, auth error), failure building the command, or an I/O error from ShellCommandExecutor. The process exit code and appIds are captured before rethrow, so the task instance records the real CLI outcome.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-hivecli/src/main/java/org/apache/dolphinscheduler/plugin/task/hivecli/HiveCliTask.java:106
@Override
public void handle(TaskCallBack taskCallBack) throws TaskException {
try {
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.appendScript(buildCommand());
final TaskResponse taskResponse = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
setExitStatusCode(taskResponse.getExitStatusCode());
setAppIds(taskResponse.getAppIds());
setProcessId(taskResponse.getProcessId());
setTaskOutputParams(shellCommandExecutor.getTaskOutputParams());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("The current HiveCLI Task has been interrupted", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("The current HiveCLI Task has been interrupted", e);
} catch (Exception e) {
log.error("hiveCli task failure", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("run hiveCli task error", e);
}
}
@Override
public void submitApplication() throws TaskException {
}
@Override
public void trackApplicationStatus() throws TaskException {
}
protected String buildCommand() {
final List<String> args = new ArrayList<>();
final String type = hiveCliParameters.getHiveCliTaskExecutionType();View on GitHub (pinned to 02eac45a1b)
Solutions
- Read the task log for the beeline/hive CLI stderr — it names the SQL or connection error
- Verify hive jdbc URL, username/password/kerberos settings in the task params
- Check the hive resource file was downloaded correctly and the SQL script generated (see generateSqlScriptFile logs)
- Fix the SQL syntax or table permissions and re-run
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:106 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/90e10998cba7a59a.
Report an issue: GitHub.