apache/dolphinscheduler · error · DinkyTaskException

dinky task params is not valid

Error message

dinky task params is not valid

What it means

DinkyTask.init() parses the task params JSON into DinkyParameters and validates them via checkParameters(). If parsing yields null (params null or malformed JSON) or checkParameters() fails (required fields like address or taskId missing/blank), a DinkyTaskException with 'dinky task params is not valid' is thrown before execution starts.

Source

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

    private String dinkyVersion;

    protected DinkyTask(TaskExecutionContext taskExecutionContext) {
        super(taskExecutionContext);
        this.taskExecutionContext = taskExecutionContext;
    }

    @Override
    public List<String> getApplicationIds() throws TaskException {
        return Collections.emptyList();
    }

    @Override
    public void init() {
        final String taskParams = taskExecutionContext.getTaskParams();
        this.dinkyParameters = JSONUtils.parseObject(taskParams, DinkyParameters.class);
        log.info("Initialize dinky task params: {}", JSONUtils.toPrettyJsonString(dinkyParameters));
        if (this.dinkyParameters == null || !this.dinkyParameters.checkParameters()) {
            throw new DinkyTaskException("dinky task params is not valid");
        }
    }

    @Override
    public void handle(TaskCallBack taskCallBack) throws TaskException {
        // Get dinky version
        dinkyVersion = getDinkyVersion(this.dinkyParameters.getAddress());
        super.handle(taskCallBack);
    }

    @Override
    public void submitApplication() throws TaskException {
        if (dinkyVersion.startsWith("0")) {
            submitApplicationV0();
        } else {
            submitApplicationV1();
        }
    }

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Open the Dinky task in the UI and set both the Dinky address (URL) and the Dinky task id.
  2. Validate the taskParams JSON is well-formed and includes all fields checked by DinkyParameters.checkParameters().
  3. Confirm the Dinky task plugin version matches your workflow definition schema.
  4. Re-save and rerun the workflow after correcting params.

Example fix

// before: incomplete params
{"localParams":[],"address":""}
// after
{"localParams":[],"address":"http://dinky-host:8888","taskId":12}
Defensive patterns

Strategy: validation

Validate before calling

DinkyParameters p = JSONUtils.parseObject(taskParams, DinkyParameters.class);
boolean valid = p != null && p.checkParameters(); // address and taskId set

Type guard

boolean validDinkyParams(DinkyParameters p) {
    return p != null && p.getAddress() != null && !p.getAddress().isEmpty() && p.getTaskId() != null;
}

Try / catch

try {
    task.init();
} catch (DinkyTaskException e) {
    log.error("Dinky params invalid: check address and taskId in task definition");
}

Prevention

When it happens

Trigger: Task params JSON missing, unparseable, or DinkyParameters.checkParameters() returning false — typically blank address or taskId in the Dinky task definition.

Common situations: Saving a Dinky task without filling the Dinky address or task id; upgrading DolphinScheduler so older param shapes no longer parse; hand-edited workflow JSON missing fields.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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