apache/dolphinscheduler · warning · TaskException

Track dinkyTask failed:

Error message

Track dinkyTask failed:

What it means

DinkyTask.trackApplicationStatusV0() polls the Dinky API for job status until completion. If the polling loop is interrupted (InterruptedException), the thread is re-interrupted, exit status is set to failure, and a TaskException with TRACK_FAILED_MSG ('Track dinkyTask failed:') is thrown. It means status tracking was aborted, not that the Dinky job itself failed.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java:222

                        finishFlag = true;
                        break;
                    case DinkyTaskConstants.STATUS_FAILED:
                    case DinkyTaskConstants.STATUS_CANCELED:
                    case DinkyTaskConstants.STATUS_UNKNOWN:
                        errorHandle(
                                jobInstanceInfoResult.get(apiResultDatasKey).get(DinkyTaskConstants.API_RESULT_ERROR)
                                        .asText());
                        finishFlag = true;
                        break;
                    default:
                        Thread.sleep(DinkyTaskConstants.SLEEP_MILLIS);
                }
            }
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
            log.error(DinkyTaskConstants.TRACK_FAILED_MSG, ex);
            setExitStatusCode(EXIT_CODE_FAILURE);
            throw new TaskException(DinkyTaskConstants.TRACK_FAILED_MSG, ex);
        }
    }

    public void trackApplicationStatusV1() 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));
                log.info("Dinky common sql task finished.");
                return;
            }
            String apiResultDataKey = DinkyTaskConstants.API_RESULT_DATA;
            boolean finishFlag = false;
            while (!finishFlag) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. This is usually expected when the task is cancelled — verify whether the interruption came from an intentional kill.
  2. If unexpected, check worker logs for shutdown or kill events at that timestamp.
  3. Rerun the task; consider increasing task timeout so long Dinky jobs are not auto-cancelled.
  4. Ensure stop/kill handlers in your deployment do not interrupt worker threads prematurely.

Example fix

// before: task timeout too short for long Dinky job
timeout=60
// after
timeout=3600
Defensive patterns

Strategy: try-catch

Try / catch

try {
    task.trackApplicationStatus();
} catch (TaskException e) {
    if (Thread.currentThread().isInterrupted()) {
        log.info("Tracking interrupted by cancellation — expected");
    }
}

Prevention

When it happens

Trigger: InterruptedException during the V0 status polling loop — typically the task being killed/cancelled from the UI or a worker shutdown while sleeping between polls.

Common situations: User stops the workflow instance while a Dinky job is still running; worker graceful shutdown; task timeout cancellation interrupting the tracking thread.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/0a91ba40d736ef30. Report an issue: GitHub.