apache/flink · error · IllegalArgumentException

Base job ID is not found in the recovered jobs.

Error message

Base job ID %s is not found in the recovered jobs.

What it means

Constructor validation in JobNameBasedJobIdManager: when recovered job infos are non-empty they must contain a job whose ID equals the given baseJobId; otherwise the recovered state is inconsistent with the base ID and recovery cannot proceed.

Solutions

  1. Address the cause reported by the error message: Base job ID the reported value is not found in the recovered jobs.
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Base job ID the reported value is not found in the recovered jobs.") and rerun the job or command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered at runtime when the operation fails because: Base job ID the reported value is not found in the recovered jobs.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Base job ID the reported value is not found in the recovered jobs.


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/3a3162abc84deeec. Report an issue: GitHub.

Appendix: source

Thrown at flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java:85

     * Creates a new job ID manager with the given base job ID and recovered job information.
     *
     * @param baseJobId the base job ID used as the origin for deriving all job IDs
     * @param allRecoveredJobInfos a collection of recovered job information; if non-empty, it
     *     <b>must contain</b> a job with ID equal to {@code baseJobId}
     */
    public JobNameBasedJobIdManager(JobID baseJobId, Collection<JobInfo> allRecoveredJobInfos) {
        this.baseJobId = checkNotNull(baseJobId);
        checkNotNull(allRecoveredJobInfos);

        if (!allRecoveredJobInfos.isEmpty()) {
            // step 1: find the first job name
            Optional<JobInfo> optionalBaseJobInfo =
                    allRecoveredJobInfos.stream()
                            .filter(jobInfo -> jobInfo.getJobId().equals(baseJobId))
                            .findFirst();

            if (optionalBaseJobInfo.isEmpty()) {
                throw new IllegalArgumentException(
                        String.format(
                                "Base job ID %s is not found in the recovered jobs.", baseJobId));
            }

            this.firstJobName = optionalBaseJobInfo.get().getJobName();

            // step 2: group jobs by job name and sort then according to the job index
            Map<String, List<JobID>> grouped =
                    allRecoveredJobInfos.stream()
                            .collect(
                                    Collectors.groupingBy(
                                            JobInfo::getJobName,
                                            Collectors.mapping(
                                                    JobInfo::getJobId, Collectors.toList())));

            for (Map.Entry<String, List<JobID>> entry : grouped.entrySet()) {
                String jobName = entry.getKey();
                List<JobID> jobIds = entry.getValue();

View on GitHub (pinned to 2f3c205e92)