apache/seatunnel · error · IllegalArgumentException
can't find task group address from taskGroupLocation
Error message
can't find task group address from taskGroupLocation: ${taskGroupLocation} What it means
JobMaster exposes a lookup that maps a TaskGroupLocation to the worker Address running it, via the taskGroupLocation->SlotProfile map. If the map is absent or does not contain the requested task group location, IllegalArgumentException is thrown because the engine cannot determine which worker hosts that task group. Indicates the pipeline's owned slot profiles were not synced or the task group no longer exists.
Solutions
- Ensure the job is in a RUNNING state and slot profiles are synced before querying task group addresses.
- Verify the TaskGroupLocation (jobId, pipelineId, taskGroupIndex) matches an existing task group.
- Retry the lookup after a short delay if it happens transiently during job initialization.
- Check JobMaster logs for prior 'Can not sync pipeline owned slot profiles with IMap' failures.
Example fix
// before: immediate lookup after submit
Address addr = jobMaster.getTaskGroupAddress(taskGroupLocation);
// after: guard on job state / retry
if (jobMaster.getJobStatus(jobId) == RUNNING) {
Address addr = jobMaster.getTaskGroupAddress(taskGroupLocation);
} Defensive patterns
Strategy: retry
Validate before calling
// before lookup
if (jobMaster.getJobStatus(jobId) != JobStatus.RUNNING) {
throw new IllegalStateException("job not running; task group addresses not yet available");
} Try / catch
try {
return jobMaster.getTaskGroupAddress(taskGroupLocation);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("can't find task group address")) {
Thread.sleep(retryMs);
return jobMaster.getTaskGroupAddress(taskGroupLocation);
}
throw e;
} Prevention
- Only query task group addresses for RUNNING jobs.
- Cache TaskGroupLocation values from engine events rather than constructing them manually.
- Watch for prior slot-profile sync failures in JobMaster logs.
When it happens
Trigger: Calling JobMaster's task-group address lookup (e.g. during cancel/retry/metrics routing) with a TaskGroupLocation that has no entry in taskGroupLocationSlotProfileMap - e.g. after job state was not fully initialized, or querying a task group of a finished/failed pipeline.
Common situations: Race at job startup where slot profile sync (syncPipelineOwnedSlotProfiles) has not completed; asking about a task group after the job failed or was cancelled; jobId/pipelineId/taskGroupIndex typo when constructing TaskGroupLocation.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- Can not sync pipeline owned slot profiles with IMap
- Cannot fetch from another split - no split remaining.
- CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION
- Connection pool error.
- Invalid state: currentSplitId is null when emitting…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e66637a9ff1267bf.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java:1067
jobHistoryService.storeFinishedJobState(this);
}
public Address queryTaskGroupAddress(TaskGroupLocation taskGroupLocation) {
PipelineLocation pipelineLocation =
new PipelineLocation(
taskGroupLocation.getJobId(), taskGroupLocation.getPipelineId());
Map<TaskGroupLocation, SlotProfile> taskGroupLocationSlotProfileMap =
ownedSlotProfilesIMap.get(pipelineLocation);
if (null != taskGroupLocationSlotProfileMap) {
SlotProfile slotProfile = taskGroupLocationSlotProfileMap.get(taskGroupLocation);
if (null != slotProfile) {
return slotProfile.getWorker();
}
}
throw new IllegalArgumentException(
"can't find task group address from taskGroupLocation: " + taskGroupLocation);
}
public synchronized void cancelJob() {
physicalPlan.cancelJob();
}
public synchronized void stopJob() {
physicalPlan.stopJob();
}
public ResourceManager getResourceManager() {
return resourceManager;
}
public CheckpointManager getCheckpointManager() {
return checkpointManager;
}View on GitHub (pinned to cf67b549a7)