{"record":{"id":"dfc54b5c15aaf64f","repo":"pentaho/pentaho-kettle","slug":"jobentryftps-succesconditionbroken","errorCode":"JobEntryFTPS.SuccesConditionBroken","errorMessage":"JobEntryFTPS.SuccesConditionBroken","messagePattern":"JobEntryFTPS\\.SuccesConditionBroken","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/JobEntryFTPSGet.java","lineNumber":846,"sourceCode":"    return result;\n  }\n\n  private void downloadFiles( FTPSConnection connection, String folder, Pattern pattern, Result result )\n    throws KettleException {\n\n    List<FTPFile> fileList = connection.getFileList( folder );\n    if ( isDetailed() ) {\n      logDetailed( BaseMessages.getString( PKG, \"JobEntryFTPS.FoundNFiles\", fileList.size() ) );\n    }\n\n    for ( int i = 0; i < fileList.size(); i++ ) {\n\n      if ( parentJob.isStopped() ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"JobEntryFTPS.JobStopped\" ) );\n      }\n\n      if ( successConditionBroken ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"JobEntryFTPS.SuccesConditionBroken\", NrErrors ) );\n      }\n\n      FTPFile file = fileList.get( i );\n      if ( isDetailed() ) {\n        logDetailed( BaseMessages.getString(\n          PKG, \"JobEntryFTPS.AnalysingFile\", file.getPath(), file.getName(), file.getMode(), file\n            .getDate().toString(), file.getFileType() == 0 ? \"File\" : \"Folder\", String\n            .valueOf( file.getSize() ) ) );\n      }\n\n      if ( !file.isDirectory() && !file.isLink() ) {\n        // download file\n        boolean getIt = true;\n        if ( getIt ) {\n          try {\n            // See if the file matches the regular expression!\n            if ( pattern != null ) {\n              Matcher matcher = pattern.matcher( file.getName() );","sourceCodeStart":828,"sourceCodeEnd":864,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/JobEntryFTPSGet.java#L828-L864","documentation":"JobEntryFTPSGet throws this KettleException when the entry's success-condition logic has flagged too many errors (successConditionBroken) while iterating the file list. The entry tracks error count (NrErrors) against configured limits (e.g., 'success if no errors', 'success if error count less than N', or a percentage); once the limit is crossed, further file processing is aborted with this message. The text comes from the JobEntryFTPS.SuccesConditionBroken message key with the error count as a parameter.","triggerScenarios":"Executing JobEntryFTPSGet where individual file downloads fail (missing remote files, permission errors, connection drops), incrementing NrErrors past the configured success-condition threshold; the next loop iteration at the successConditionBroken check throws.","commonSituations":"Remote directories containing files the FTPS account cannot read; transient network drops mid-batch; misconfigured success_condition / nr_errors_limit in the job entry dialog so a single failure trips the limit.","solutions":["Fix the underlying per-file failures logged as NrErrors (check remote file permissions, existence, and FTPS connectivity).","Relax the success condition in the job entry settings (e.g., change from 'success if no errors' to a higher error limit) if partial success is acceptable.","Add a filter/wildcard so the file list only contains files the job can actually process."],"exampleFix":"// before: any single file error aborts the entry\nentry.setSuccessCondition( JobEntryFTPSGet.SUCCESS_IF_NO_ERRORS );\n// after: tolerate up to N errors\nentry.setSuccessCondition( JobEntryFTPSGet.SUCCESS_IF_ERRORS_LESS );\nentry.setNrErrorsLimit( \"5\" );","handlingStrategy":"validation","validationCode":"// validate entry config before executing\nif ( JobEntryFTPSGet.SUCCESS_IF_ERRORS_LESS.equals( entry.getSuccessCondition() )\n     && ( entry.getNrErrorsLimit() == null || Integer.parseInt( entry.getNrErrorsLimit() ) <= 0 ) ) {\n  throw new IllegalArgumentException( \"nr_errors_limit must be > 0 for SUCCESS_IF_ERRORS_LESS\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  jobEntry.execute( result, context );\n} catch ( KettleException e ) {\n  if ( e.getMessage() != null && e.getMessage().contains( \"SuccesConditionBroken\" ) ) {\n    log.warn( \"FTPS get aborted after error threshold; check per-file failures in logs\" );\n    result.setResult( false );\n  } else { throw e; }\n}","preventionTips":["Pre-filter the remote file list (wildcards/filters) so only processable files are fetched.","Verify FTPS account read permissions on the target directory before running.","Set the success condition and error limit explicitly rather than relying on defaults.","Review per-file error logs after any threshold abort."],"tags":["ftps","kettle","success-condition","error-limit"],"backgroundTag":"invalid-config-value","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"}