{"record":{"id":"fe88a3090783631c","repo":"pentaho/pentaho-kettle","slug":"jobftps-error-retrievingfilenames","errorCode":"JobFTPS.Error.RetrievingFilenames","errorMessage":"JobFTPS.Error.RetrievingFilenames","messagePattern":"JobFTPS\\.Error\\.RetrievingFilenames","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java","lineNumber":504,"sourceCode":"   * this method is used to return filenames in working directory\n   *\n   * @return filenames\n   * @throws KettleException\n   */\n  public String[] getFileNames() throws KettleException {\n    ArrayList<String> list = null;\n    try {\n      List<FTPFile> fileList = getFileList( getWorkingDirectory() );\n      list = new ArrayList<String>();\n      Iterator<FTPFile> it = fileList.iterator();\n      while ( it.hasNext() ) {\n        FTPFile file = it.next();\n        if ( !file.isDirectory() ) {\n          list.add( file.getName() );\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.RetrievingFilenames\" ), e );\n    }\n    return list == null ? null : list.toArray( new String[list.size()] );\n  }\n\n  /**\n   *\n   * this method is used to delete a file in remote host\n   *\n   * @param file\n   *          File on remote host to delete\n   * @throws KettleException\n   */\n  public void deleteFile( FTPFile file ) throws KettleException {\n    try {\n      this.connection.deleteFile( file );\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JobFTPS.Error.DeletingFile\", file.getName() ), e );\n    }","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ftps/impl/src/main/java/org/pentaho/di/job/entries/ftpsget/FTPSConnection.java#L486-L522","documentation":"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.","triggerScenarios":"getFileNames when listFiles/iteration over FTPFile entries throws — typically a failed LIST command, broken control channel, or permission denial on the remote folder","commonSituations":"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","solutions":["Verify the remote folder path and that the FTPS user has list permission","Open passive-mode port ranges on the firewall or switch to active mode","Try a different connection/protocol type setting if LIST output parsing fails","List the folder manually with an FTPS client to compare the server reply"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify the folder is listable first\nconnection.getFileList(remoteFolder); // throws KettleException if not listable","typeGuard":null,"tryCatchPattern":"try {\n  String[] names = connection.getFileNames(folder, filter);\n} catch (KettleException e) {\n  // likely LIST/firewall issue; reconnect and retry once\n  throw e;\n}","preventionTips":["Open passive-mode data port ranges on firewalls","Verify remote folder exists and is listable for the user","Match the connection type to the server's LIST format"],"tags":["ftps","directory-listing","network"],"backgroundTag":"http-request-failed","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"}