Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFTPFileList_1 error caused by: java.io.EOFException: SSL peer shut down incorrectly

All the standard troubleshooting that I could possibly think of has been done.  

  • FTP application like filezilla and WinSCP have no issues connecting and moving files from the same server.
  • I have tested the below config successfully with a standard open FTP.  As well as an SFTP server.  Both were off site and outside the network.
  • I have obtained the target FTPS server's self signed cert and loaded it into java's cacerts.  I get the same error when using a new mykeystore.jks file.

I will not be offended if you ask me about other troubleshooting steps.  Any questions / thoughts / theories are much appreciated.

 

0683p000009M8ez.png

 

0683p000009M8f4.png

 

0683p000009M8f9.png

 

 

 

 

 

[statistics] connecting to socket on port 3362

[statistics] 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:753)

                at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.tFTPConnection_1Process(SPSI_FTP_TEST2.java:535)

                at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.runJobInTOS(SPSI_FTP_TEST2.java:2125)

                at spsi.spsi_ftp_test2_0_1.SPSI_FTP_TEST2.main(SPSI_FTP_TEST2.java:1975)

Caused by: java.io.EOFException: SSL peer shut down incorrectly

                at sun.security.ssl.InputRecord.read(Unknown Source)

                ... 14 more

[statistics] disconnected

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

I saw this workaround before:

System.setProperty("jdk.tls.useExtendedMasterSecret", "false");

https://www.oracle.com/technetwork/java/javase/8u161-relnotes-4021379.html

http://bugs.java.com/view_bug.do?bug_id=JDK-8148421

Since 1.8u161 users or higher need to configure their java settings and set 

It's not safe to add this by default in our ftp components, however, you could add a tJava component executed before the ftp connection and

call the code below in this tJava component.

System.setProperty("jdk.tls.useExtendedMasterSecret", "false");

Let us know if it helps.

Best regards

Sabrina

 

 

Best regards

Sabrina

 

View solution in original post

11 Replies
Anonymous
Not applicable
Author

Hello,

Do you have an environment that the FTP server enable ssl connection? Did you configure tFTPconnection for FTPS? Which requires a certificate.

Best regards

Sabrina

phil974
Contributor
Contributor

Hi,

I have exactly the same problem.

Connection is fine after configuring a keystore file, but same error with tftpfilelist or tftpget.

 

Do you find any solution ?

Anonymous
Not applicable
Author

Hello,

Above Exception is a generic exception we get in the client if there is any of below scenario:

  1. This issue probably occurs because of Internet connection problem/poor internet connection
  2. You are missing your certificates.
  3. If Server and Client support different version of TLS e.g. server support TLS2 while Client support only TLS1.

To know the exact cause of failure, you could enable

-Djavax.net.debug=all

while executing your job?

Could you please indicate on which talend build version you got this issue and what's JDK version are you using? Would you mind giving us some screenshots of your job setting? Which will be helpful for us to address your issue?

Please mask your sensitive data as well.

Best regards

Sabrina

 

 

phil974
Contributor
Contributor

Thks a lot for your help !!!

 

Point 1: Connection is good. I can connect to the FTP server with Filezilla in implicit mode.

 

Point 2: To be able to have implicit mode, i use the ftps. I follow this article to generate a keystore file.

https://community.talend.com/s/article/Specifying-a-keystore-file-of-a-tFTPConnection-with-FTPS-support-JXZHQ?language=en_US

 

Point 3: I try with different versions of Talend. I use TOS 8.0.1 with zulu 11.

My job is simple tftpconnect and tftpget.

 

Anonymous
Not applicable
Author

Hello,

Are you able to connect to HTTPS url using Talend Studio 8.0.1?

Have you already tried the steps mentioned in the below article to see if it helps for your use case?

https://community.talend.com/s/article/Three-ways-to-set-a-truststore-for-an-SSL-TLS-connection-in-a...

Best regards

Sabrina

phil974
Contributor
Contributor

Hello,

 

Yes, i did this to generate the certificate.

My job is simple: connect and get.

0695b00000PMGDoAAP.pngThe connect is ok. I use FTPs, with implicite mode, specifying the jks file.

0695b00000PMGESAA5.pngBut the problem is on the get. I have the same problem with filelist component.

0695b00000PMGFQAA5.png 

 

Anonymous
Not applicable
Author

Hello,

Are you using Java 11 for talend open studio V 8.0?

Best regards

Sabrina

phil974
Contributor
Contributor

Yes, i update my version before calling you ! Before installing the last version, i had the same problems with tos 7.2.

 

It's not related to this bug in java ?

https://stambia.org/kb/16-execution-issues/730-ftps-severs-forcing-to-reuse-ssl-tls-connection-throws-javax-net-ssl-sslhandshakeexception

Anonymous
Not applicable
Author

Hello,

I saw this workaround before:

System.setProperty("jdk.tls.useExtendedMasterSecret", "false");

https://www.oracle.com/technetwork/java/javase/8u161-relnotes-4021379.html

http://bugs.java.com/view_bug.do?bug_id=JDK-8148421

Since 1.8u161 users or higher need to configure their java settings and set 

It's not safe to add this by default in our ftp components, however, you could add a tJava component executed before the ftp connection and

call the code below in this tJava component.

System.setProperty("jdk.tls.useExtendedMasterSecret", "false");

Let us know if it helps.

Best regards

Sabrina

 

 

Best regards

Sabrina