pentaho/pentaho-kettle · error · KettleException
JobFTPS.Error.DeletingFile
JobFTPS.Error.DeletingFile
Error message
JobFTPS.Error.DeletingFile
What it means
FTP client failure in FTPSConnection.deleteFile (called from downloadFiles): the remote file could not be deleted after processing. The localized message includes the filename and chains the underlying FTP error, typically a permission problem or the file already being gone.
Solutions
- Check the FTPS user has DELETE permission on the remote folder
- Guard against races: only delete files you just downloaded and handle 'file not found' as benign
- Re-list the directory to confirm the file still exists before deleting
- Verify connection health; reconnect and retry if the control channel dropped
Example fix
// before
connection.deleteFile(ftpFile); // fails if already deleted
// after
try {
connection.deleteFile(ftpFile);
} catch (KettleException e) {
logBasic("File already removed, skipping: " + ftpFile.getName());
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean stillThere = Arrays.stream(connection.getFileNames(remoteDir, null)) .anyMatch(n -> n.equals(file.getName()));
Try / catch
try {
connection.deleteFile(ftpFile);
} catch (KettleException e) {
logBasic("Delete after download failed (possibly already removed): " + ftpFile.getName());
} Prevention
- Treat not-found on post-download delete as benign
- Grant delete permission to the FTPS user
- Run a single job instance to avoid concurrent consumption races
When it happens
Trigger: downloadFiles -> deleteFile(FTPFile) after transfer when the server rejects DELE — file already gone, permission denied, or connection lost
Common situations: another process removed the file between listing and delete; FTPS user lacks delete permission; race with files being consumed by multiple job instances
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
- Could not delete stale file " + buildFilename
- JobEntryFTPS.JobStopped
- JobEntryFTPS.SuccesConditionBroken
- JobFTPS.Error.ChangingFolder
- JobFTPS.Error.Connecting
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/78811dd98ffa1eb1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java:521
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.RetrievingFilenames" ), e );
}
return list == null ? null : list.toArray( new String[list.size()] );
}
/**
*
* this method is used to delete a file in remote host
*
* @param file
* File on remote host to delete
* @throws KettleException
*/
public void deleteFile( FTPFile file ) throws KettleException {
try {
this.connection.deleteFile( file );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.DeletingFile", file.getName() ), e );
}
}
/**
*
* this method is used to delete a file in remote host
*
* @param filename
* Name of file on remote host to delete
* @throws KettleException
*/
public void deleteFile( String filename ) throws KettleException {
try {
this.connection.deleteFile( new FTPFile( getWorkingDirectory(), filename ) );
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.DeletingFile", filename ), e );
}
}View on GitHub (pinned to f3058517a1)