apache/hadoop · error · NotFoundException

unable to load configuration for job: {jid}

Error message

unable to load configuration for job: {jid}

What it means

Returned by the JobHistoryServer REST endpoint GET /ws/v1/history/mapreduce/jobs/{jobid}/conf when constructing the ConfInfo object from the job's stored configuration throws IOException. The server maps that to a NotFoundException (HTTP 404), meaning the job id was accepted but its configuration could not be loaded from history storage — typically because the history file/conf section is missing, partial, or not yet available.

Source

Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsWebServices.java:327

    checkAccess(job, hsr);
    return new JobCounterInfo(this.ctx, job);
  }

  @GET
  @Path("/mapreduce/jobs/{jobid}/conf")
  @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
      MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
  public ConfInfo getJobConf(@Context HttpServletRequest hsr,
      @PathParam("jobid") String jid) {

    init();
    Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
    checkAccess(job, hsr);
    ConfInfo info;
    try {
      info = new ConfInfo(job);
    } catch (IOException e) {
      throw new NotFoundException("unable to load configuration for job: "
          + jid);
    }
    return info;
  }

  @GET
  @Path("/mapreduce/jobs/{jobid}/tasks")
  @Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
      MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
  public TasksInfo getJobTasks(@Context HttpServletRequest hsr,
      @PathParam("jobid") String jid, @QueryParam("type") String type) {

    init();
    Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
    checkAccess(job, hsr);
    TasksInfo allTasks = new TasksInfo();
    for (Task task : job.getTasks().values()) {
      TaskType ttype = null;

View on GitHub (pinned to 2add963021)

Solutions

  1. Retry after the job fully retires to done and the JHS cache refresh interval (mapreduce.jobhistory.loadedjobs.cache.size / date-cached interval) elapses
  2. Confirm the job exists: GET /ws/v1/history/mapreduce/jobs and check the listed finish time
  3. Inspect JHS and NameNode logs for the underlying IOException (missing file, permissions, checksum)
  4. Verify the job id matches this cluster's history (application id range) and that the done dir is reachable

Example fix

// before
curl -s http://jhs:19888/ws/v1/history/mapreduce/jobs/job_1234567890000_0001/conf

// after
# confirm the job and its finish state first
curl -s http://jhs:19888/ws/v1/history/mapreduce/jobs | jq '.jobs.job[] | select(.id=="job_1234567890000_0001")'
# then retry /conf; if 404 persists, check JHS logs for the IOException cause
Defensive patterns

Strategy: try-catch

Validate before calling

// probe availability before requesting conf
curl -sf "$JHS/ws/v1/history/mapreduce/jobs/$JID" >/dev/null || echo "job not in history yet"

Try / catch

try {
  ConfInfo conf = jhsClient.getJobConf(jobId);
} catch (NotFoundException e) { // javax.ws.rs.NotFoundException / HTTP 404
  // job history not fully loaded yet, or conf missing from history file
  scheduleRetry(jobId, delay = jhsCacheRefreshInterval);
  if (retriesExhausted) alert("history conf unavailable for " + jobId);
}

Prevention

When it happens

Trigger: GET /ws/v1/history/mapreduce/jobs/job_1400000000000_0001/conf where the job's history data has not been moved to the done directory, the job.conf is absent from the history file, or the file is corrupt. Also hit when the job id exists in cache but its done-file was deleted by retention/cleanup.

Common situations: Querying a just-finished job before moveToDone completes and JHS refreshes its cache; History files removed by mapreduce.jobhistory.cleaner or manual cleanup while JHS still lists the job; Corrupt/partial history file after JHS or NN restart mid-write; Pointing the request at the wrong JobHistoryServer (multi-cluster, wrong federation view)

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/38d080a23163d25d. Report an issue: GitHub.