{"record":{"id":"f8607f114743ce1a","repo":"pentaho/pentaho-kettle","slug":"carte-error-noserverfound","errorCode":"Carte.Error.NoServerFound","errorMessage":"Carte.Error.NoServerFound","messagePattern":"Carte\\.Error\\.NoServerFound","errorType":"exception","errorClass":"Carte.CarteCommandException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/www/Carte.java","lineNumber":369,"sourceCode":"    try {\n      KettleClientEnvironment.init();\n\n      Client client = null;\n      if ( sslMode ) {\n        client = createClientWithSSLConfig( sslConfig, hostname, port );\n      } else {\n        client = ClientBuilder.newClient();\n      }\n\n      client.register( HttpAuthenticationFeature.basic( username, Encr.decryptPasswordOptionallyEncrypted( password ) ) );\n\n      // check if the user can access the carte server. Don't really need this call but may want to check it's output at\n      // some point\n      String contextURL = HttpUtil.constructUrl( new Variables(), hostname, port, \"kettle\", \"\", sslMode );\n      WebTarget target = client.target( contextURL + \"/status/?xml=Y\" );\n      String response = target.request().get( String.class );\n      if ( response == null || !response.contains( \"<serverstatus>\" ) ) {\n        throw new Carte.CarteCommandException( BaseMessages.getString( PKG, NO_SERVER_FOUND_ERROR, hostname, \"\"\n            + port ) );\n      }\n\n      // This is the call that matters\n      target = client.target( contextURL + \"/stopCarte\" );\n      response = target.request().get( String.class );\n      if ( response == null || !response.contains( \"Shutting Down\" ) ) {\n        throw new Carte.CarteCommandException( BaseMessages.getString( PKG, \"Carte.Error.NoShutdown\", hostname, \"\"\n            + port ) );\n      }\n    } catch ( Exception e ) {\n      throw new Carte.CarteCommandException( BaseMessages.getString( PKG, NO_SERVER_FOUND_ERROR, hostname, \"\"\n          + port ), e );\n    }\n  }\n\n  private static Client createClientWithSSLConfig( SslConfiguration sslConfig, String hostname, String port  )\n    throws CarteCommandException {","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/Carte.java#L351-L387","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify hostname and port in the Carte configuration match the running server (curl http://host:port/kettle/status/?xml=Y).","Check sslMode setting matches the server (https vs http in HttpUtil.constructUrl).","Confirm the Carte process is actually running; this error is expected if it was already stopped.","Check network/firewall reachability between the client and the Carte host.","If authentication is enabled, ensure credentials are supplied so the status endpoint returns serverstatus XML."],"exampleFix":"// before: sslMode mismatch -> status call returns error page\nCarte.main(new String[]{\"/path/carte.xml\"}); // carte.xml on plain http\n// client built with sslMode=true -> no <serverstatus>\n// after: match client sslMode to server config\nString sslMode = \"N\"; // server carte.xml says N (no SSL)\nString contextURL = HttpUtil.constructUrl(new Variables(), hostname, port, \"kettle\", \"\", sslMode);","handlingStrategy":"validation","validationCode":"String status = HttpUtil.constructUrl(new Variables(), hostname, port, \"kettle\", \"\", sslMode)\n    + \"/status/?xml=Y\";\nString resp = client.target(status).request().get(String.class);\nif (resp == null || !resp.contains(\"<serverstatus>\")) {\n    throw new IllegalStateException(\"Carte not reachable at \" + hostname + \":\" + port);\n}","typeGuard":null,"tryCatchPattern":"try {\n    carte.shutdown();\n} catch (CarteCommandException e) {\n    if (\"Carte.Error.NoServerFound\".equals(e.getCode()) || e.getMessage().contains(\"NoServerFound\")) {\n        log.warn(\"Carte already down or unreachable at {}:{}\", hostname, port); // treat as already-stopped\n        return;\n    }\n    throw e;\n}","preventionTips":["Probe /kettle/status/?xml=Y before shutdown and treat unreachable as already-stopped.","Keep client sslMode consistent with the Carte server configuration.","Store hostname/port in configuration shared by both Carte startup and shutdown tooling.","Verify network/firewall rules allow the status endpoint from shutdown clients."],"tags":["network","http","carte","rest","shutdown"],"backgroundTag":"http-request-failed","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"}