{"record":{"id":"5398783ed7b722fc","repo":"pentaho/pentaho-kettle","slug":"there-was-an-error-posting-the-job-on-the-remote-server","errorCode":null,"errorMessage":"There was an error posting the job on the remote server: ","messagePattern":"There was an error posting 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":1770,"sourceCode":"\n          // Send the zip file over to the slave server...\n          String result =\n              slaveServer.sendExport( topLevelResource.getArchiveName(), RegisterPackageServlet.TYPE_JOB, topLevelResource\n                  .getBaseResourceName() );\n          WebResult webResult = WebResult.fromXMLString( result );\n          if ( !webResult.getResult().equalsIgnoreCase( WebResult.STRING_OK ) ) {\n            throw new KettleException( \"There was an error passing the exported job to the remote server: \" + Const.CR\n                + webResult.getMessage() );\n          }\n          carteObjectId = webResult.getId();\n        }\n      } else {\n        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;","sourceCodeStart":1752,"sourceCodeEnd":1788,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1752-L1788","documentation":"For non-exported (in-place XML) remote execution, sendToSlaveServer() serializes the JobConfiguration to XML and POSTs it to RegisterJobServlet. If the returned WebResult is not OK, the library throws a KettleException with this message plus the server's message: the Carte server failed to register/post the job.","triggerScenarios":"Calling sendToSlaveServer without resource export where slaveServer.sendXML(...) to RegisterJobServlet returns non-OK (server failed to parse/accept the JobConfiguration XML, authentication rejected, servlet missing).","commonSituations":"Carte version mismatch so the XML tag set is not understood; job XML references plugins not installed on the server; wrong Carte port/URL; Carte node busy or out of memory.","solutions":["Inspect webResult.getMessage() appended to the exception for the server-side root cause.","Align Pentaho/Carte versions between client and remote server.","Install any missing plugins/steps/job entries referenced by the job on the Carte server.","Check Carte logs (catalina/carte log) at the time of the request for the real stack trace.","Verify SlaveServer host/port/credentials and that RegisterJobServlet is reachable."],"exampleFix":"// before: server lacks the plugin used by the job\nString reply = slaveServer.sendXML(xml, RegisterJobServlet.CONTEXT_PATH + \"/?xml=Y\"); // non-OK\n// after: pre-check plugin availability\nif (!remoteHasPlugin(slaveServer, \"my-custom-job-entry\")) {\n  throw new IllegalStateException(\"Install missing plugin on Carte first\");\n}","handlingStrategy":"try-catch","validationCode":"if (!slaveServer.ping()) {\n  throw new IllegalStateException(\"Carte unreachable before job registration\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return Job.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"posting the job\")) {\n    log.error(\"Carte rejected job registration: {}\", e.getMessage());\n  }\n  throw e;\n}","preventionTips":["Confirm RegisterJobServlet reachability (curl the Carte status page first).","Install all plugins referenced by the job on the Carte host.","Watch Carte logs during registration for the real stack trace.","Retry registration once on transient network errors before failing the pipeline."],"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"}