{"record":{"id":"7dbb4686d5bff5c5","repo":"pentaho/pentaho-kettle","slug":"http-status-status-uri-reasonphrase-responsemessage","errorCode":null,"errorMessage":"HTTP Status <status> - <uri> - <reasonPhrase><responseMessage>","messagePattern":"HTTP Status <status> - <uri> - <reasonPhrase><responseMessage>","errorType":"http","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java","lineNumber":663,"sourceCode":"      if ( status == HttpStatus.SC_NOT_FOUND ) {\n        message = String.format( \"%s%s%s%s\",\n          BaseMessages.getString( PKG, \"SlaveServer.Error.404.Title\" ),\n          Const.CR, Const.CR,\n          BaseMessages.getString( PKG, \"SlaveServer.Error.404.Message\" )\n        );\n      } else {\n        String responseMessage = null;\n        if ( responseBody != null ) {\n          WebResult webResult = WebResult.fromXMLString( responseBody );\n          responseMessage = webResult.getMessage();\n        }\n        message = String.format( \"HTTP Status %d - %s - %s%s\",\n          status,\n          method.getURI().toString(),\n          statusLine.getReasonPhrase(),\n          responseMessage == null ? \"\" : \"\\n\" + responseMessage );\n      }\n      throw new KettleException( message );\n    }\n  }\n\n  // Method is defined as package-protected in order to be accessible by unit tests\n  HttpPost buildSendExportMethod( String type, String load, InputStream is ) throws UnsupportedEncodingException {\n    String serviceUrl = RegisterPackageServlet.CONTEXT_PATH;\n    if ( type != null && load != null ) {\n      serviceUrl +=\n        \"/?\" + RegisterPackageServlet.PARAMETER_TYPE + \"=\" + type\n        + \"&\" + RegisterPackageServlet.PARAMETER_LOAD + \"=\" + URLEncoder.encode( load, \"UTF-8\" );\n    }\n\n    String urlString = constructUrl( serviceUrl );\n    if ( log.isDebug() ) {\n      log.logDebug( BaseMessages.getString( PKG, \"SlaveServer.DEBUG_ConnectingTo\", urlString ) );\n    }\n\n    HttpPost method = new HttpPost( urlString );","sourceCodeStart":645,"sourceCodeEnd":681,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java#L645-L681","documentation":"Thrown by SlaveServer.handleStatus when an HTTP response from a Pentaho cartel/slave server has a status code considered an error (>= 400 or unexpected status). The message embeds the HTTP status, the request URI, the reason phrase, and optionally the response body. It signals the slave rejected or failed the status/management request.","triggerScenarios":"getResponse/handleStatus is called on an HttpClient method and the slave returns a non-success status (e.g. 404 wrong servlet context, 401 auth, 500 server error, 503 slave down).","commonSituations":"Slave server not running or crashed; wrong hostname/port in the slave definition; servlet not deployed on the slave; authentication misconfiguration; firewall/proxy returning error pages.","solutions":["Check the slave server process is running and reachable at the configured host:port","Verify the URI in the message and correct the slave server definition if host/port/context is wrong","Inspect the response body in the message for the server-side error detail","Check slave logs for the corresponding 4xx/5xx error"],"exampleFix":"// before: assuming success without checking status\nString status = slaveServer.getStatus();\n// after: guard with a health check first\nif (!slaveServer.ping()) { throw new KettleException(\"Slave unreachable: \" + slaveServer.getName()); }\nString status = slaveServer.getStatus();","handlingStrategy":"try-catch","validationCode":"// Pre-flight: ping the slave before calling services\nif (!slaveServer.ping()) { throw new KettleException(\"Slave not reachable: \" + slaveServer.getName()); }","typeGuard":"boolean isSlaveReachable(SlaveServer s) { try { return s != null && s.ping(); } catch (Exception e) { return false; } }","tryCatchPattern":"try { result = slaveServer.handleStatus(method); }\ncatch (KettleException e) { log.error(\"Slave HTTP error: \" + e.getMessage()); // includes status, URI, body\n  // check slave logs; retry or fail over to another slave }","preventionTips":["Monitor slave health (ping/getStatus) before submitting work","Keep slave server definitions (host/port) verified against deployment","Check slave servlet deployment after upgrades","Use authentication settings consistent with Carte security config"],"tags":["http","network","slave-server","rest"],"backgroundTag":"http-error-response","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}