apache/dolphinscheduler · error · RuntimeException
Linkis task params is not valid
Error message
Linkis task params is not valid
What it means
LinkisTask.init() parses the task's JSON params into LinkisParameters and validates them via checkParameters(). When required fields are absent or inconsistent, it throws this RuntimeException to abort task initialization before any process is launched. It signals a task-definition problem, not a runtime/infra failure.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-linkis/src/main/java/org/apache/dolphinscheduler/plugin/task/linkis/LinkisTask.java:75
protected static final Pattern LINKIS_STATUS_REGEX = Pattern.compile(Constants.LINKIS_STATUS_REGEX);
public LinkisTask(TaskExecutionContext taskExecutionContext) {
super(taskExecutionContext);
this.shellCommandExecutor = new ShellCommandExecutor(taskExecutionContext);
}
@Override
public List<String> getApplicationIds() throws TaskException {
return Collections.emptyList();
}
@Override
public void init() {
linkisParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), LinkisParameters.class);
log.info("Initialize Linkis task params {}", JSONUtils.toPrettyJsonString(linkisParameters));
if (!linkisParameters.checkParameters()) {
throw new RuntimeException("Linkis task params is not valid");
}
}
@Override
public void submitApplication() throws TaskException {
try {
// construct process
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.properties(ParameterUtils.convert(taskRequest.getPrepareParamsMap()))
.appendScript(buildCommand());
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, null);
setExitStatusCode(commandExecuteResult.getExitStatusCode());
setAppIds(findTaskId(commandExecuteResult.getResultString()));
setProcessId(commandExecuteResult.getProcessId());
linkisParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("The current Linkis task has been interrupted", e);View on GitHub (pinned to 02eac45a1b)
Solutions
- Open the task definition in the DolphinScheduler UI and fill in all required Linkis parameters.
- Validate the task JSON stored in the DB / passed via API contains a non-empty, correct params payload for LinkisParameters.
- Read LinkisParameters.checkParameters() to see exactly which fields it requires and ensure they are set.
- Re-save the workflow so updated params are serialized into taskRequest.taskParams, then rerun.
Example fix
// before (task params JSON)
{"localParams":[],"resourceList":[]}
// after
{"localParams":[],"resourceList":[],"params":"<required linkis params>"} Defensive patterns
Strategy: validation
Validate before calling
LinkisParameters p = JSONUtils.parseObject(taskParams, LinkisParameters.class);
if (p == null || !p.checkParameters()) {
throw new IllegalArgumentException("Linkis task params invalid: fill required fields before submitting");
} Try / catch
try {
task.init();
} catch (RuntimeException e) {
log.error("Linkis params rejected: {}", e.getMessage());
// surface param-validation failure to the user instead of retrying
} Prevention
- Always complete all required fields in the Linkis task UI form before saving.
- Validate task params in a test workflow before production.
- Keep param JSON in sync with LinkisParameters after upgrades.
- Log and review the pretty-printed params to confirm required keys.
When it happens
Trigger: LinkisParameters.checkParameters() returns false because required fields in the Linkis task definition JSON are empty or missing (e.g. no params content), or taskRequest.getTaskParams() contains JSON that parses but fails validation.
Common situations: Users create a Linkis task node in the DolphinScheduler UI but leave required fields blank; task JSON generated by automation/API lacks mandatory keys; workflow import produces params that no longer satisfy checkParameters().
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
- dvc task params is not valid
- flink task params is not valid
- hiveCli task params is not valid
- MLFlow task params is not valid
- DESCRIPTION_TOO_LONG_ERROR
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/f0942b6bd9d7ba59.
Report an issue: GitHub.