apache/dolphinscheduler · critical · IllegalArgumentException
Cannot find TaskChannel for :
Error message
Cannot find TaskChannel for :
What it means
TaskPluginManager.getTaskChannel looks up the registered TaskChannel by task type and throws IllegalArgumentException when the type is not in taskChannelMap. It means no task plugin is installed/registered for the requested task type.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskPluginManager.java:67
String factoryName = entry.getKey();
TaskChannelFactory factory = entry.getValue();
taskChannelMap.put(factoryName, factory.create());
log.info("Success register task plugin: {}", factoryName);
}
}
/**
* Get the TaskChannel by type, if the TaskChannel is not found, will throw
* @param type task type, cannot be null
* @throws IllegalArgumentException if the TaskChannel is not found
*/
public static TaskChannel getTaskChannel(String type) {
checkNotNull(type, "type cannot be null");
TaskChannel taskChannel = taskChannelMap.get(type);
if (taskChannel == null) {
throw new IllegalArgumentException("Cannot find TaskChannel for : " + type);
}
return taskChannel;
}
/**
* Check if the task parameters is validated
* @param taskType task type, cannot be null
* @param taskParams task parameters
* @return true if the task parameters is validated, otherwise false
* @throws IllegalArgumentException if the TaskChannel is not found
* @throws IllegalArgumentException if cannot deserialize the task parameters
*/
public static boolean checkTaskParameters(String taskType, String taskParams) {
AbstractParameters abstractParameters = parseTaskParameters(taskType, taskParams);
return abstractParameters.checkParameters();
}
/**View on GitHub (pinned to 02eac45a1b)
Solutions
- Install/verify the plugin: mvn the matching dolphinscheduler-task-<type> module or copy its jar to the task-plugin dir
- Check worker logs that taskChannelMap loaded the plugin at startup
- Verify the task type string spelling matches the plugin's name
- Align workflow definitions with installed plugin versions after upgrade
- Call TaskPluginManager.loadTaskChannel()/install logic before lookups in embedded usage
Example fix
// before
TaskChannel channel = TaskPluginManager.getTaskChannel(taskType);
// after
if (!TaskPluginManager.checkTaskTypeExists(taskType)) {
throw new IllegalStateException("Plugin not installed for type: " + taskType);
}
TaskChannel channel = TaskPluginManager.getTaskChannel(taskType); Defensive patterns
Strategy: validation
Validate before calling
// before use
if (!TaskPluginManager.checkTaskTypeExists(taskType)) {
throw new IllegalArgumentException("Plugin not installed for task type: " + taskType);
}
TaskChannel ch = TaskPluginManager.getTaskChannel(taskType); Try / catch
try {
TaskChannel ch = TaskPluginManager.getTaskChannel(taskType);
} catch (IllegalArgumentException e) {
log.error("Missing task plugin: {}", e.getMessage());
// surface a deployment/installation problem, not a user error
} Prevention
- Install all dolphinscheduler-task-* plugins on master and worker
- Check startup logs that plugins loaded into taskChannelMap
- Keep plugin set in sync with workflow definitions across upgrades
- Validate task type strings against known plugin names
When it happens
Trigger: getTaskChannel(type) with a type string absent from taskChannelMap — misspelled taskType, plugin jar not loaded, or calling before TaskPluginManager.loadTaskChannel() plugin installation runs.
Common situations: Plugin directory missing the plugin jar on the worker/master (incomplete deployment); custom task type not registered; workflow JSON from a newer version referencing a plugin absent in this installation; typo in task type passed to the API.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Can not find any datasource by name %s
- Can not find valid workflow by name %s
- Can not find valid project by name %s
- Can not find valid resource by name %s
- Can not find valid environment by name %s
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/0068612f693f8ab1.
Report an issue: GitHub.