pentaho/pentaho-kettle · error · Carte.CarteCommandException

Carte.Error.NoServerFound

Carte.Error.NoServerFound

Error message

Carte.Error.NoServerFound

What it means

Carte.callStopCarteRestService throws this CarteCommandException (message keyed Carte.Error.NoServerFound) when the probe GET to /kettle/status/?xml=Y on the target host:port does not return a response containing <serverstatus>. It means no reachable/healthy Carte server was found at the address, so the stopCarte call is skipped.

Solutions

  1. Verify hostname and port in the Carte configuration match the running server (curl http://host:port/kettle/status/?xml=Y).
  2. Check sslMode setting matches the server (https vs http in HttpUtil.constructUrl).
  3. Confirm the Carte process is actually running; this error is expected if it was already stopped.
  4. Check network/firewall reachability between the client and the Carte host.
  5. If authentication is enabled, ensure credentials are supplied so the status endpoint returns serverstatus XML.

Example fix

// before: sslMode mismatch -> status call returns error page
Carte.main(new String[]{"/path/carte.xml"}); // carte.xml on plain http
// client built with sslMode=true -> no <serverstatus>
// after: match client sslMode to server config
String sslMode = "N"; // server carte.xml says N (no SSL)
String contextURL = HttpUtil.constructUrl(new Variables(), hostname, port, "kettle", "", sslMode);
Defensive patterns

Strategy: validation

Validate before calling

String status = HttpUtil.constructUrl(new Variables(), hostname, port, "kettle", "", sslMode)
    + "/status/?xml=Y";
String resp = client.target(status).request().get(String.class);
if (resp == null || !resp.contains("<serverstatus>")) {
    throw new IllegalStateException("Carte not reachable at " + hostname + ":" + port);
}

Try / catch

try {
    carte.shutdown();
} catch (CarteCommandException e) {
    if ("Carte.Error.NoServerFound".equals(e.getCode()) || e.getMessage().contains("NoServerFound")) {
        log.warn("Carte already down or unreachable at {}:{}", hostname, port); // treat as already-stopped
        return;
    }
    throw e;
}

Prevention

When it happens

Trigger: During shutdown, the HTTP GET to contextURL + '/status/?xml=Y' returns null, an error page, or non-XML output lacking the <serverstatus> element — wrong hostname/port, server already down, auth failure, or SSL mode mismatch.

Common situations: Carte already stopped (double shutdown); wrong port or hostname in carte config; SSL configured client-side but server on plain HTTP (or vice versa); firewall/network dropping the request; authentication required so the status call returns an error page instead of serverstatus XML.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/www/Carte.java:369

    try {
      KettleClientEnvironment.init();

      Client client = null;
      if ( sslMode ) {
        client = createClientWithSSLConfig( sslConfig, hostname, port );
      } else {
        client = ClientBuilder.newClient();
      }

      client.register( HttpAuthenticationFeature.basic( username, Encr.decryptPasswordOptionallyEncrypted( password ) ) );

      // check if the user can access the carte server. Don't really need this call but may want to check it's output at
      // some point
      String contextURL = HttpUtil.constructUrl( new Variables(), hostname, port, "kettle", "", sslMode );
      WebTarget target = client.target( contextURL + "/status/?xml=Y" );
      String response = target.request().get( String.class );
      if ( response == null || !response.contains( "<serverstatus>" ) ) {
        throw new Carte.CarteCommandException( BaseMessages.getString( PKG, NO_SERVER_FOUND_ERROR, hostname, ""
            + port ) );
      }

      // This is the call that matters
      target = client.target( contextURL + "/stopCarte" );
      response = target.request().get( String.class );
      if ( response == null || !response.contains( "Shutting Down" ) ) {
        throw new Carte.CarteCommandException( BaseMessages.getString( PKG, "Carte.Error.NoShutdown", hostname, ""
            + port ) );
      }
    } catch ( Exception e ) {
      throw new Carte.CarteCommandException( BaseMessages.getString( PKG, NO_SERVER_FOUND_ERROR, hostname, ""
          + port ), e );
    }
  }

  private static Client createClientWithSSLConfig( SslConfiguration sslConfig, String hostname, String port  )
    throws CarteCommandException {

View on GitHub (pinned to f3058517a1)