Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am developing a standard daily SFTP file get job. I have a similar job working perfectly fine with a public FTP. I have been troubleshooting the below for two days with no success. Its my belief that this job is successfully connecting to the SFTP. So why does this job error out with the SFTP and work with the public FTP? If more detail is required just let me know.
Error Message:
Exception in component tFTPFileList_1 (SPSI_FTP_TEST2)
java.lang.NullPointerException
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.tFTPFileList_1Process(SPSI_FTP_TEST2.java:781)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.tFTPConnection_1Process(SPSI_FTP_TEST2.java:575)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.runJobInTOS(SPSI_FTP_TEST2.java:2208)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.main(SPSI_FTP_TEST2.java:2058)
The solution was to configuring tFTPconnection_1 for FTPS. I obtained the FTPS's self-signed certificate using OpenSSL and then imported it into mykeystore.jks. Then add the java keystore location to the tFTPConnection_1 config.
I will port the above post to a seperate thread.
Can you manually connect via SFTP using the same details? If so, do you see the folder your component is looking for?
This link presents a very similar issue; https://community.talend.com/t5/Design-and-Development/Problems-using-tFTPConnection/m-p/198521
It lists using a CA certificate for FTPS as the solution which has me a bit confused.
Are you using FTPS or SFTP? There is a difference. FTPS requires a certificate. SFTP is based on SSH and does not require a certificate. You need to know which you are using.
The other question is, do you have a proxy configured for your Filezilla? If so, you will need this configured in the Advanced settings of your connection component.
I got trapped by the assumption that the FTP was using SFTP. I have requested the certificate from the FTP admin.
Sometime you just got to talk it out to get the solution. Thank you for your time and comments!
Good luck. Come back if you have any issues when you have the certificate 🙂
After configuring tFTPconnection_1 for FTPS. I obtained the FTPS's self-signed certificate using OpenSSL and then imported it into mykeystore.jks. Now when I run trace debug tFTPConnection_1 is ok. It is now failing on the next component in the chain, tFTPFileList_1 with the below error. I currently researching whether this may be a firewall issue. Any expert guidance would be appreciated.
Starting job SPSI_FTP_TEST2 at 13:44 04/12/2019.
[statistics] connecting to socket on port 3356
[statistics] connected
[trace] connecting to socket on port 4748
[trace] connected
Exception in component tFTPFileList_1 (SPSI_FTP_TEST2)
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.commons.net.ftp.FTPSClient._openDataConnection_(FTPSClient.java:646)
at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:785)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3409)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3339)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:3016)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:3069)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.tFTPFileList_1Process(SPSI_FTP_TEST2.java:787)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.tFTPConnection_1Process(SPSI_FTP_TEST2.java:567)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.runJobInTOS(SPSI_FTP_TEST2.java:2318)
at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.main(SPSI_FTP_TEST2.java:2154)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(Unknown Source)
... 14 more
[statistics] disconnected
[trace] disconnected
Job SPSI_FTP_TEST2 ended at 13:44 04/12/2019. [exit code=1]
The solution was to configuring tFTPconnection_1 for FTPS. I obtained the FTPS's self-signed certificate using OpenSSL and then imported it into mykeystore.jks. Then add the java keystore location to the tFTPConnection_1 config.
I will port the above post to a seperate thread.