apache/hadoop · warning · NotFoundException
job, {}, is not found
Error message
job, {}, is not found What it means
AMWebServices.getJobFromJobIdString converts the REST 'jobid' parameter and, when the conversion yields a null JobId (rather than throwing IllegalArgumentException), responds with NotFoundException — HTTP 404 with body 'job, <jid>, is not found'. The AM REST API (served via the AM webapp / RM proxy) only understands its own job, and a null after conversion means the id could not be mapped to a live job id.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AMWebServices.java:150
*/
public static Job getJobFromJobIdString(String jid, AppContext appCtx) throws NotFoundException {
JobId jobId;
Job job;
try {
jobId = MRApps.toJobID(jid);
} catch (YarnRuntimeException e) {
// TODO: after MAPREDUCE-2793 YarnRuntimeException is probably not expected here
// anymore but keeping it for now just in case other stuff starts failing.
// Also, the webservice should ideally return BadRequest (HTTP:400) when
// the id is malformed instead of NotFound (HTTP:404). The webserver on
// top of which AMWebServices is built seems to automatically do that for
// unhandled exceptions
throw new NotFoundException(e.getMessage());
} catch (IllegalArgumentException e) {
throw new NotFoundException(e.getMessage());
}
if (jobId == null) {
throw new NotFoundException("job, " + jid + ", is not found");
}
job = appCtx.getJob(jobId);
if (job == null) {
throw new NotFoundException("job, " + jid + ", is not found");
}
return job;
}
/**
* convert a task id string to an actual task and handle all the error
* checking.
*/
public static Task getTaskFromTaskIdString(String tid, Job job) throws NotFoundException {
TaskId taskID;
Task task;
try {
taskID = MRApps.toTaskID(tid);
} catch (YarnRuntimeException e) {View on GitHub (pinned to 2add963021)
Solutions
- Use the exact job identifier from the application (job_<startTime>_<seq>) as reported by the RM or job client
- For finished jobs, query the Job History Server REST endpoint instead of the AM
- Validate the jobid format client-side before issuing the GET
Defensive patterns
Strategy: validation
Validate before calling
// client-side guard before hitting AM REST
static boolean isPlausibleJobId(String jid) {
return jid != null && jid.matches("job_\\d+_\\d+");
}
if (!isPlausibleJobId(jobid)) throw new IllegalArgumentException("bad jobid: " + jobid); Prevention
- Always take the jobid verbatim from the job client / RM rather than assembling it by hand
- Treat HTTP 404 from AM REST as 'unknown here' and fall back to JHS REST for finished jobs
When it happens
Trigger: GET /mapreduce/ws/v1/mapreduce/jobs/{jobid} with an empty or structurally odd jobid string that survives parsing but maps to no JobId; null jid passed programmatically through the webapp routing.
Common situations: Hand-built URLs with typos in the job id; monitoring scraping AM REST after the id format changed expectations; trailing junk in the path segment.
Related errors
- taskid {} not found or invalid
- task not found with id {}
- task attempt id {} not found or invalid
- Error getting info on task attempt id {}
- unable to load configuration for job: {}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/643bf4fe218cb5dc.
Report an issue: GitHub.