tFTPFileList_1 error NullPointerExeption

Highlighted
Five Stars

tFTPFileList_1 error NullPointerExeption

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)

 

sc01.PNGsc02.PNGsc03.PNGsc04.PNG

 


Accepted Solutions
Highlighted
Five Stars

Re: tFTPFileList_1 error NullPointerExeption

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.

View solution in original post


All Replies
Highlighted
Community Manager

Re: tFTPFileList_1 error NullPointerExeption

Can you manually connect via SFTP using the same details? If so, do you see the folder your component is looking for?

Highlighted
Five Stars

Re: tFTPFileList_1 error NullPointerExeption

  • I can successfully connect from the same box using Filezilla.  The listed directory is present and was cut/pasted from Filezilla.
  • I can successfully connect and get files from a public FTP with only the connection, and source directory being different.

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.

Community Manager

Re: tFTPFileList_1 error NullPointerExeption

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.

Highlighted
Five Stars

Re: tFTPFileList_1 error NullPointerExeption

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!

Highlighted
Community Manager

Re: tFTPFileList_1 error NullPointerExeption

Good luck. Come back if you have any issues when you have the certificate :-)

Highlighted
Five Stars

Re: tFTPFileList_1 error NullPointerExeption

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]

Highlighted
Five Stars

Re: tFTPFileList_1 error NullPointerExeption

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.

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog