{"record":{"id":"4cddc274b126263f","repo":"pentaho/pentaho-kettle","slug":"there-was-an-error-starting-the-job-on-the-remote-server","errorCode":null,"errorMessage":"There was an error starting the job on the remote server: ","messagePattern":"There was an error starting the job on the remote server: ","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1783,"sourceCode":"        String xml = new JobConfiguration( jobMeta, executionConfiguration ).getXML();\n\n        String reply = slaveServer.sendXML( xml, RegisterJobServlet.CONTEXT_PATH + \"/?xml=Y\" );\n        WebResult webResult = WebResult.fromXMLString( reply );\n        if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n          throw new KettleException( \"There was an error posting the job on the remote server: \" + Const.CR + webResult\n              .getMessage() );\n        }\n        carteObjectId = webResult.getId();\n      }\n\n      // Start the job\n      //\n      String reply =\n          slaveServer.execService( StartJobServlet.CONTEXT_PATH + \"/?name=\" + URLEncoder.encode( jobMeta.getName(),\n              \"UTF-8\" ) + \"&xml=Y&id=\" + carteObjectId );\n      WebResult webResult = WebResult.fromXMLString( reply );\n      if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n        throw new KettleException( \"There was an error starting the job on the remote server: \" + Const.CR + webResult\n            .getMessage() );\n      }\n      return carteObjectId;\n    } catch ( KettleException ke ) {\n      throw ke;\n    } catch ( Exception e ) {\n      throw new KettleException( e );\n    }\n  }\n\n  public void addJobListener( JobListener jobListener ) {\n    synchronized ( jobListeners ) {\n      jobListeners.add( jobListener );\n    }\n  }\n\n  public void addJobEntryListener( JobEntryListener jobEntryListener ) {\n    jobEntryListeners.add( jobEntryListener );","sourceCodeStart":1765,"sourceCodeEnd":1801,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1765-L1801","documentation":"After registering the job remotely, sendToSlaveServer() invokes StartJobServlet via slaveServer.execService(...). If the returned WebResult is not OK, or the service call itself throws, the library throws a KettleException with this message. The job was registered on the Carte server but could not be started there.","triggerScenarios":"Calling sendToSlaveServer where execService(StartJobServlet...) returns non-OK (remote start rejected, job ID unknown/expired, server-side start error) or the HTTP call throws (connection refused, timeout, malformed XML reply).","commonSituations":"Carte server shut down between register and start; job failed instantly on the server (missing DB connections not defined there); firewall blocks the start call; XML reply corrupted by a proxy.","solutions":["Read webResult.getMessage() in the exception for the Carte-side reason the start failed.","Confirm the Carte server is still up and reachable; check carte log for the start attempt.","Ensure the job's required resources (DB connections, env variables) exist on the remote server.","Verify the carteObjectId is still valid; re-register the job and start again in one flow.","Check network/proxy between client and Carte for request tampering or timeouts."],"exampleFix":"// before\nString reply = slaveServer.execService(StartJobServlet.CONTEXT_PATH + \"/?name=\" + ...);\n// after: guard connectivity before start\nif (!slaveServer.ping()) {\n  throw new IllegalStateException(\"Carte down before start; re-register required\");\n}\nString reply = slaveServer.execService(StartJobServlet.CONTEXT_PATH + \"/?name=\" + ...);","handlingStrategy":"retry","validationCode":"if (!slaveServer.ping()) {\n  throw new IllegalStateException(\"Carte down; cannot start job remotely\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return Job.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);\n} catch (KettleException e) {\n  if (isTransient(e)) {\n    return retryStart(jobMeta, execCfg, repo, metaStore, 2);\n  }\n  throw e;\n}","preventionTips":["Keep register+start within one monitored flow so the carteObjectId does not expire.","Health-check Carte before and after registration.","Ensure remote job prerequisites (DB connections, env vars) exist on the server.","Set explicit timeouts on SlaveServer HTTP calls."],"tags":["remote-execution","http","carte"],"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"}