pentaho/pentaho-kettle · error · KettleException

HTTP Status

Error message

HTTP Status <status> - <uri> - <reasonPhrase><responseMessage>

What it means

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.

Solutions

  1. Check the slave server process is running and reachable at the configured host:port
  2. Verify the URI in the message and correct the slave server definition if host/port/context is wrong
  3. Inspect the response body in the message for the server-side error detail
  4. Check slave logs for the corresponding 4xx/5xx error

Example fix

// before: assuming success without checking status
String status = slaveServer.getStatus();
// after: guard with a health check first
if (!slaveServer.ping()) { throw new KettleException("Slave unreachable: " + slaveServer.getName()); }
String status = slaveServer.getStatus();
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight: ping the slave before calling services
if (!slaveServer.ping()) { throw new KettleException("Slave not reachable: " + slaveServer.getName()); }

Type guard

boolean isSlaveReachable(SlaveServer s) { try { return s != null && s.ping(); } catch (Exception e) { return false; } }

Try / catch

try { result = slaveServer.handleStatus(method); }
catch (KettleException e) { log.error("Slave HTTP error: " + e.getMessage()); // includes status, URI, body
  // check slave logs; retry or fail over to another slave }

Prevention

When it happens

Trigger: 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).

Common situations: 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.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/7dbb4686d5bff5c5. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/cluster/SlaveServer.java:663

      if ( status == HttpStatus.SC_NOT_FOUND ) {
        message = String.format( "%s%s%s%s",
          BaseMessages.getString( PKG, "SlaveServer.Error.404.Title" ),
          Const.CR, Const.CR,
          BaseMessages.getString( PKG, "SlaveServer.Error.404.Message" )
        );
      } else {
        String responseMessage = null;
        if ( responseBody != null ) {
          WebResult webResult = WebResult.fromXMLString( responseBody );
          responseMessage = webResult.getMessage();
        }
        message = String.format( "HTTP Status %d - %s - %s%s",
          status,
          method.getURI().toString(),
          statusLine.getReasonPhrase(),
          responseMessage == null ? "" : "\n" + responseMessage );
      }
      throw new KettleException( message );
    }
  }

  // Method is defined as package-protected in order to be accessible by unit tests
  HttpPost buildSendExportMethod( String type, String load, InputStream is ) throws UnsupportedEncodingException {
    String serviceUrl = RegisterPackageServlet.CONTEXT_PATH;
    if ( type != null && load != null ) {
      serviceUrl +=
        "/?" + RegisterPackageServlet.PARAMETER_TYPE + "=" + type
        + "&" + RegisterPackageServlet.PARAMETER_LOAD + "=" + URLEncoder.encode( load, "UTF-8" );
    }

    String urlString = constructUrl( serviceUrl );
    if ( log.isDebug() ) {
      log.logDebug( BaseMessages.getString( PKG, "SlaveServer.DEBUG_ConnectingTo", urlString ) );
    }

    HttpPost method = new HttpPost( urlString );

View on GitHub (pinned to f3058517a1)