Pentaho

 View Only

 Is FTPES supported by Pentaho 9.3? (Explicit FTP over SSL/TLS)

Juan Sierra Pons's profile image
Juan Sierra Pons posted 05-29-2023 05:18

Hi

From FTP, FTPs, FTPes, SFTP explained


FTPES (port 21)
Explicit FTP over SSL/TLS. This starts out as plain FTP over port 21, but through special FTP commands is upgraded to TLS/SSL encryption. This upgrade usually occurs before the user credentials are sent over the connection. FTPES is a somewhat newer form of encrypted FTP (although still over a decade old), and is considered the preferred way to establish encrypted connections because it can be more firewall-friendly. None of the major web browsers support FTPES.
Example for FileZilla, for Host: ftpes//:SERVER-IP


I am trying with the Upload files to FTPS the test are successful  (test connection and test folder) but the job fails with the following error:


2023/05/29 11:02:26 - Upload files to FTPS - Starting job entry
2023/05/29 11:02:26 - Upload files to FTPS - Start of FTPS job entry
2023/05/29 11:02:26 - Upload files to FTPS - Opened connection to [FTP.SERVER.COM]
2023/05/29 11:02:26 - Upload files to FTPS - set passive ftp connection mode
2023/05/29 11:02:26 - Upload files to FTPS - Set timeout to [0]
2023/05/29 11:02:27 - Upload files to FTPS - logged in with user [USERNAME]
2023/05/29 11:02:27 - Upload files to FTPS - Working directory is [/]
2023/05/29 11:02:27 - Upload files to FTPS - Changed to directory [REMOTE_DIRECTORY]
2023/05/29 11:02:27 - Upload files to FTPS - Found [1] files in the local directory [C:\Temp\popo]
2023/05/29 11:02:28 - Upload files to FTPS - File [dummy5.txt] does exist on the remote host!
2023/05/29 11:02:28 - Upload files to FTPS - putting file [C:\Temp\popo\dummy5.txt] to remote directory [Rota]
2023/05/29 11:02:29 - Upload files to FTPS - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Error putting to FTP : 
2023/05/29 11:02:29 - Upload files to FTPS - Error uploading file [C:\Temp\popo\dummy5.txt]!
2023/05/29 11:02:29 - Upload files to FTPS - Connection or outbound has closed
2023/05/29 11:02:29 - Upload files to FTPS - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : org.pentaho.di.core.exception.KettleException: 
2023/05/29 11:02:29 - Upload files to FTPS - Error uploading file [C:\Temp\popo\dummy5.txt]!
2023/05/29 11:02:29 - Upload files to FTPS - Connection or outbound has closed
2023/05/29 11:02:29 - Upload files to FTPS - 
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.entries.ftpsget.FTPSConnection.uploadFile(FTPSConnection.java:482)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.entries.ftpsput.JobEntryFTPSPUT.execute(JobEntryFTPSPUT.java:575)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.Job.execute(Job.java:703)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.Job.execute(Job.java:844)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.Job.execute(Job.java:513)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.pentaho.di.job.Job.run(Job.java:393)
2023/05/29 11:02:29 - Upload files to FTPS - Caused by: java.net.SocketException: Connection or outbound has closed
2023/05/29 11:02:29 - Upload files to FTPS -     at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1297)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.ftp4che.io.SSLSupport.write(SSLSupport.java:129)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.ftp4che.io.SocketProvider.write(SocketProvider.java:152)
2023/05/29 11:02:29 - Upload files to FTPS -     at org.ftp4che.io.ReplyWorker.run(ReplyWorker.java:384)
2023/05/29 11:02:29 - Upload files to FTPS - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : Error quiting FTP connection : null
2023/05/29 11:02:29 - DUMMY_FTPS_JOB - Finished job entry [Upload files to FTPS] (result=[false])
2023/05/29 11:02:29 - DUMMY_FTPS_JOB - Job execution finished
2023/05/29 11:02:29 - DUMMY_FTPS_JOB - EmbeddedMetastore objects have been disposed.
2023/05/29 11:02:29 - Spoon - Job has ended.



Any idea what am I missing?

Thanks for your time

Juan Sierra Pons's profile image
Juan Sierra Pons

Finally I will use an script step and use curl inside.
curl works on linux and windows and supports FTPES

https://www.lewisroberts.com/2010/08/06/scripting-ftpes-explicit-tlsssl-with-curl/