pentaho/pentaho-kettle · error · KettleException

JobFTPS.Error.RetrievingFilenames

JobFTPS.Error.RetrievingFilenames

Error message

JobFTPS.Error.RetrievingFilenames

What it means

FTP client failure in FTPSConnection.getFileNames: listing or filtering the working directory failed. The localized message wraps the original exception raised while collecting the non-directory entries.

Solutions

  1. Verify the remote folder path and that the FTPS user has list permission
  2. Open passive-mode port ranges on the firewall or switch to active mode
  3. Try a different connection/protocol type setting if LIST output parsing fails
  4. List the folder manually with an FTPS client to compare the server reply
Defensive patterns

Strategy: retry

Validate before calling

// verify the folder is listable first
connection.getFileList(remoteFolder); // throws KettleException if not listable

Try / catch

try {
  String[] names = connection.getFileNames(folder, filter);
} catch (KettleException e) {
  // likely LIST/firewall issue; reconnect and retry once
  throw e;
}

Prevention

When it happens

Trigger: getFileNames when listFiles/iteration over FTPFile entries throws — typically a failed LIST command, broken control channel, or permission denial on the remote folder

Common situations: remote folder does not exist or lacks read permission; FTPS data channel blocked by firewall (passive ports not open); server returns non-parseable LIST output for the chosen connection type

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/fe88a3090783631c. Report an issue: GitHub.

Appendix: source

Thrown at plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java:504

   * this method is used to return filenames in working directory
   *
   * @return filenames
   * @throws KettleException
   */
  public String[] getFileNames() throws KettleException {
    ArrayList<String> list = null;
    try {
      List<FTPFile> fileList = getFileList( getWorkingDirectory() );
      list = new ArrayList<String>();
      Iterator<FTPFile> it = fileList.iterator();
      while ( it.hasNext() ) {
        FTPFile file = it.next();
        if ( !file.isDirectory() ) {
          list.add( file.getName() );
        }
      }
    } 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 );
    }

View on GitHub (pinned to f3058517a1)