{"record":{"id":"22a239bc8255a2e6","repo":"pentaho/pentaho-kettle","slug":"there-was-an-error-passing-the-exported-job-to-the-remote","errorCode":null,"errorMessage":"There was an error passing the exported job to the remote server: ","messagePattern":"There was an error passing the exported job to the remote server: ","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/Job.java","lineNumber":1759,"sourceCode":"        // First export the job... slaveServer.getVariable(\"MASTER_HOST\")\n        //\n        try ( FileObject tempFile = KettleVFS.getInstance( DefaultBowl.getInstance() )\n            .createTempFile( \"jobExport\", \".zip\", System.getProperty( \"java.io.tmpdir\" ), jobMeta ) ) {\n            // Use tempFile within this block\n        \n          Bowl globalBowl = repository != null ? repository.getBowl() : DefaultBowl.getInstance();\n          TopLevelResource topLevelResource =\n              ResourceUtil.serializeResourceExportInterface( jobMeta.getBowl(), globalBowl, tempFile.getName().toString(),\n                jobMeta, jobMeta, repository, metaStore, executionConfiguration.getXML(),\n                 CONFIGURATION_IN_EXPORT_FILENAME );\n\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      //","sourceCodeStart":1741,"sourceCodeEnd":1777,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/Job.java#L1741-L1777","documentation":"When exporting a job (with resources) to a remote server, sendToSlaveServer() zips the job and calls slaveServer.sendExport(...) via RegisterPackageServlet. If the returned WebResult is not OK, the library throws a KettleException containing this message plus the server's message. It means the Carte server rejected the uploaded exported job package.","triggerScenarios":"Calling sendToSlaveServer on a job with resource export enabled where slaveServer.sendExport returns a non-OK WebResult (server-side registration failed, servlet rejected the archive, authentication failed, or an HTTP-level error was converted to an error WebResult).","commonSituations":"Carte server version mismatch with client; wrong register package servlet URL/port; Carte not authorized to write its temp/repository location; archive name/base resource name issues after export.","solutions":["Read webResult.getMessage() in the exception text: it contains the Carte server's own error; fix that root cause first.","Confirm the Carte server is running and the same (or compatible) Pentaho version as the client.","Check Carte authentication credentials in the SlaveServer definition (username/password).","Verify the remote server has writable temp space and correct karaf/plugins installed to load the job.","Retry with executionConfiguration exporting fewer resources to isolate which part of the archive the server rejects."],"exampleFix":"// before: stale Carte credentials\nSlaveServer ss = new SlaveServer(\"carte\", \"host\", \"8080\", \"admin\", \"wrongpass\");\n// after: verify credentials and reachability first\nSlaveServer ss = new SlaveServer(\"carte\", \"host\", \"8080\", \"cluster\", \"cluster\");\nif (!ss.ping()) throw new IllegalStateException(\"Carte unreachable before export\");","handlingStrategy":"try-catch","validationCode":"if (!slaveServer.ping()) {\n  throw new IllegalStateException(\"Carte server unreachable before export: \" + slaveServer.getHostname());\n}","typeGuard":null,"tryCatchPattern":"try {\n  return Job.sendToSlaveServer(jobMeta, execCfg, repo, metaStore);\n} catch (KettleException e) {\n  log.error(\"Remote export rejected: {}\", e.getMessage());\n  throw new RemoteExecutionException(e.getMessage(), e);\n}","preventionTips":["Ping the slave server before dispatching exports.","Keep client and Carte versions aligned.","Verify Carte credentials in the SlaveServer metadata.","Ensure the remote host has writable temp space and required plugins."],"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"}