apache/dolphinscheduler · error · TaskException
Submit dinkyTask failed:${result.get(API_RESULT_MSG)}
Error message
Submit dinkyTask failed:${result.get(API_RESULT_MSG)} What it means
In DinkyTask.submitApplicationV1(), the Dinky API responded but with a non-success result: the response's msg field (API_RESULT_MSG) is logged and appended to 'Submit dinkyTask failed:' and thrown as TaskException. Unlike 783, the HTTP call itself succeeded — Dinky rejected the submission and returned an error payload.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java:165
String address = this.dinkyParameters.getAddress();
String taskId = this.dinkyParameters.getTaskId();
boolean isOnline = this.dinkyParameters.isOnline();
JsonNode result;
String apiResultDataKey = DinkyTaskConstants.API_RESULT_DATA;
// Submit dinky-1.0.0 task
result = submitTaskV1(address, taskId, isOnline, generateVariables());
if (checkResultV1(result)) {
status = result.get(DinkyTaskConstants.API_RESULT_SUCCESS).asBoolean();
if (result.get(apiResultDataKey).has(DinkyTaskConstants.API_RESULT_JOB_INSTANCE_ID)
&& !(result.get(apiResultDataKey)
.get(DinkyTaskConstants.API_RESULT_JOB_INSTANCE_ID) instanceof NullNode)) {
jobInstanceId =
result.get(apiResultDataKey).get(DinkyTaskConstants.API_RESULT_JOB_INSTANCE_ID).asText();
}
} else {
log.error(DinkyTaskConstants.SUBMIT_FAILED_MSG + "{}", result.get(DinkyTaskConstants.API_RESULT_MSG));
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException(
DinkyTaskConstants.SUBMIT_FAILED_MSG + result.get(DinkyTaskConstants.API_RESULT_MSG));
}
} catch (Exception ex) {
Thread.currentThread().interrupt();
log.error(DinkyTaskConstants.SUBMIT_FAILED_MSG, ex);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException(DinkyTaskConstants.SUBMIT_FAILED_MSG, ex);
}
}
public void trackApplicationStatusV0() throws TaskException {
try {
String address = this.dinkyParameters.getAddress();
String taskId = this.dinkyParameters.getTaskId();
if (status && jobInstanceId == null) {
// Use address-taskId as app id
setAppIds(String.format(DinkyTaskConstants.APPIDS_FORMAT, address, taskId));
setExitStatusCode(mapStatusToExitCode(true));View on GitHub (pinned to 02eac45a1b)
Solutions
- Read the appended API result message in the exception/log — it states Dinky's own rejection reason.
- Verify the taskId exists in Dinky and the caller has permission to submit it.
- Check Dinky authentication config (token/user) used by the task.
- Open the job in the Dinky UI and fix any server-side job errors, then rerun.
Example fix
// before: nonexistent task id
{"address":"http://dinky:8888","taskId":99999}
// after
{"address":"http://dinky:8888","taskId":12} Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check that the dinky task id exists
// GET {address}/dinky-task/{taskId} expecting success=true Try / catch
try {
task.submitApplication();
} catch (TaskException e) {
log.error("Dinky rejected submit: {}", e.getMessage()); // message carries API_RESULT_MSG
} Prevention
- Verify the Dinky task id exists before scheduling the workflow.
- Keep Dinky auth tokens valid and rotated.
- Fix job compile errors in the Dinky UI before automation runs.
When it happens
Trigger: The Dinky V1 API returns a JSON body whose success flag is false; the API result msg (e.g. authentication failure, unknown task id, Dinky-side compile error) is included in the thrown message.
Common situations: Wrong Dinky task id or task deleted in Dinky; invalid Dinky token/credentials; the referenced Dinky job fails on save/submit server-side (e.g. Flink SQL error).
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- Backfill workflow failed: %s
- Recover workflow instance failed: %s
- K8sJobExecutor fail to submit job
- dinky task params is not valid
- Submit dinkyTask failed:
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/61344457a9f1fcdb.
Report an issue: GitHub.