{"record":{"id":"8d32faf592272431","repo":"apache/hadoop","slug":"invalid-response-status-code-code","errorCode":null,"errorMessage":"Invalid response status code: {code}","messagePattern":"Invalid response status code: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobEndNotifier.java","lineNumber":92,"sourceCode":"        .setSocketTimeout(timeout)\n        .build());\n    HttpClient client = httpClientBuilder.build();\n    HttpGet httpGet = new HttpGet(new URI(uri));\n    httpGet.setHeader(\"Accept\", \"*/*\");\n    return client.execute(httpGet).getStatusLine().getStatusCode();\n  }\n\n  // for use by the LocalJobRunner, without using a thread&queue,\n  // simple synchronous way\n  public static void localRunnerNotification(JobConf conf, JobStatus status) {\n    JobEndStatusInfo notification = createNotification(conf, status);\n    if (notification != null) {\n      do {\n        try {\n          int code = httpNotification(notification.getUri(),\n              notification.getTimeout());\n          if (code != 200) {\n            throw new IOException(\"Invalid response status code: \" + code);\n          }\n          else {\n            break;\n          }\n        }\n        catch (IOException ioex) {\n          LOG.error(\"Notification error [\" + notification.getUri() + \"]\", ioex);\n        }\n        catch (Exception ex) {\n          LOG.error(\"Notification error [\" + notification.getUri() + \"]\", ex);\n        }\n        try {\n          Thread.sleep(notification.getRetryInterval());\n        }\n        catch (InterruptedException iex) {\n          LOG.error(\"Notification retry error [\" + notification + \"]\", iex);\n        }\n      } while (notification.configureForRetry());","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobEndNotifier.java#L74-L110","documentation":"Error \"Invalid response status code: {code}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobEndNotifier.java:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the job end notification URL (mapreduce.job.end.notification.url); the endpoint must return HTTP 200, or adjust mapreduce.job.end.notification.retry.attempts/interval."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}