pentaho/pentaho-kettle · error · KettleException
HTTP Status
Error message
HTTP Status %d - %s - %s
What it means
Thrown in SlaveServer's HTTP execution path when the response status code is >= 400. Formatted as "HTTP Status <code> - <uri> - <reason phrase>". It reports that the slave server rejected the request and includes the exact URI so the caller can identify which service call failed.
Solutions
- Verify the URI in the error points to the correct slave service and port
- Check the slave server is up: hit the URI manually (curl/browser) and inspect the response
- Review slave-side logs for the exception that produced the 4xx/5xx status
- Fix authentication settings on the slave server definition if status is 401/403
Example fix
// before: blind call
String xml = slaveServer.executeService("/kettle/status/", "GET", null, null);
// after: pre-flight reachability check
if (slaveServer == null || !slaveServer.ping()) { throw new KettleException("Slave not reachable"); }
String xml = slaveServer.executeService("/kettle/status/", "GET", null, null); Defensive patterns
Strategy: try-catch
Validate before calling
int code = statusCode; // from execute path
if (code >= 400) { throw new KettleException("Slave will reject request (last status " + code + ")"); } Type guard
boolean isOk(int statusCode) { return statusCode >= 200 && statusCode < 400; } Try / catch
try { body = slaveServer.executeHttp(...); }
catch (KettleException e) { if (e.getMessage().startsWith("HTTP Status 4")) { fixClientRequest(); }
else if (e.getMessage().startsWith("HTTP Status 5")) { checkSlaveLogsAndRetry(); } throw e; } Prevention
- Validate the slave endpoint URI (scheme, host, port, context path)
- Check slave credentials when 401/403 occurs
- Inspect slave logs for 500s
- Run curl against the same URI to reproduce and debug
When it happens
Trigger: Any executeHttp/execute method call to a slave server where the returned status code is 400 or greater — bad request, missing servlet, auth failure, or internal slave error.
Common situations: Carte endpoint URL misconfigured (wrong port/path); slave servlet missing after upgrade; credentials invalid (401/403); slave threw an exception (500) processing the request.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- HTTP Status
- Carte.Error.NoServerFound
- Client error creating folder
- Failed to fetch driver metadata for
- Auth error
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b03b3c7f62ce1f55.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java:938
// The status code
if ( log.isDebug() ) {
log.logDebug(
BaseMessages.getString( PKG, "SlaveServer.DEBUG_ResponseStatus", Integer.toString( statusCode ) ) );
}
String responseBody = getResponseBodyAsString( httpResponse.getEntity().getContent() );
if ( log.isDetailed() ) {
log.logDetailed( BaseMessages.getString( PKG, "SlaveServer.DETAILED_FinishedReading", Integer
.toString( responseBody.getBytes().length ) ) );
}
if ( log.isDebug() ) {
log.logDebug( BaseMessages.getString( PKG, "SlaveServer.DEBUG_ResponseBody", responseBody ) );
}
if ( statusCode >= 400 ) {
throw new KettleException( String.format( "HTTP Status %d - %s - %s", statusCode, method.getURI().toString(),
statusLine.getReasonPhrase() ) );
}
return responseBody;
} finally {
// Release current connection to the connection pool once you are done
method.releaseConnection();
if ( log.isDetailed() ) {
log.logDetailed( BaseMessages.getString( PKG, "SlaveServer.DETAILED_ExecutedService", service, hostname ) );
}
}
}
// Method is defined as package-protected in order to be accessible by unit tests
HttpClient getHttpClient() {
SlaveConnectionManager connectionManager = SlaveConnectionManager.getInstance();
return connectionManager.createHttpClient();
}View on GitHub (pinned to f3058517a1)