Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFTPConnection Operation timed out (Connection timed out) - Working fine in FileZilla

0683p000009M3Td.png

 

Created certificate following these steps 

 

keytool -keystore clientkeystore -genkey -alias client -keystore local_keystore.jks
keytool -importkeystore -srckeystore local_keystore.jks -destkeystore local_keystore.jks -deststoretype pkcs12
openssl s_client -connect 37.97.69.116:21 -starttls ftp </dev/null 2>/dev/null |openssl x509 -outform PEM > ftp_server.pem
openssl x509 -inform PEM -in ftp_server.pem -outform DEF -out ftp_server.cer
keytool -import -file ftp_server.cer -keystore local_keystore.jks

 

0683p000009M3Tn.png

 

 

Error 

 

[statistics] connecting to socket on port 3606

[statistics] connected

Exception in component tFTPConnection_1 (jobv1)

java.net.ConnectException: Operation timed out (Connection timed out)

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.apache.commons.net.SocketClient._connect(SocketClient.java:243)

at org.apache.commons.net.SocketClient.connect(SocketClient.java:202)

at pwc_projects.jobv1_0_1.jobv1.tFTPConnection_1Process(jobv1.java:444)

at pwc_projects.jobv1_0_1.jobv1.runJobInTOS(jobv1.java:1149)

at pwc_projects.jobv1_0_1.jobv1.main(jobv1.java:1000)

[statistics] disconnected

 

Labels (3)
10 Replies
DataTeam1
Creator

You get info: "Operation timed out", did you check the firewall, antivirus or something like that which can block your connection?

akumar2301
Specialist II

Can you check implicit mode FTPS is correct in your configuration ?

Usually FTPS  implicit port are 989/990. Explicit port can be 21or anything else.

 

Also I am not sure Port 22 can be used in explicit mode of FTPS as it is usually SFTP SSH port.

Anonymous
Not applicable
Author

@DataTeam I don't think the firewall is the issue as it is working fine from FileZilla

 

@uganesh  I have tested the same ports in both the configuration and still no luck 

akumar2301
Specialist II

Can you please share filezila log? I have doubt that connection should be sftp instead of FTPS.
Anonymous
Not applicable
Author

Please find the logs below. 

2019-03-19 07:59:11 86622 1 Status: Resolving address of XXX.com
2019-03-19 07:59:11 86622 1 Status: Connecting to XXX:21...
2019-03-19 07:59:11 86622 1 Status: Connection established, waiting for welcome message...
2019-03-19 07:59:11 86622 1 Response: 220 Microsoft FTP Service
2019-03-19 07:59:11 86622 1 Command: AUTH TLS
2019-03-19 07:59:11 86622 1 Response: 234 AUTH command ok. Expecting TLS Negotiation.
2019-03-19 07:59:11 86622 1 Status: Initializing TLS...
2019-03-19 07:59:11 86622 1 Status: Verifying certificate...
2019-03-19 07:59:11 86622 1 Status: TLS connection established.
2019-03-19 07:59:11 86622 1 Command: USER chamws
2019-03-19 07:59:11 86622 1 Response: 331 Password required
2019-03-19 07:59:11 86622 1 Command: PASS ************
2019-03-19 07:59:11 86622 1 Response: 230-Directory has 4,081,799,168 bytes of disk space available.
2019-03-19 07:59:11 86622 1 Response: 230 User logged in.
2019-03-19 07:59:11 86622 1 Command: SYST
2019-03-19 07:59:11 86622 1 Response: 215 Windows_NT
2019-03-19 07:59:11 86622 1 Command: FEAT
2019-03-19 07:59:11 86622 1 Response: 211-Extended features supported:
2019-03-19 07:59:11 86622 1 Response:  LANG EN*
2019-03-19 07:59:11 86622 1 Response:  UTF8
2019-03-19 07:59:11 86622 1 Response:  AUTH TLS;TLS-C;SSL;TLS-P;
2019-03-19 07:59:11 86622 1 Response:  PBSZ
2019-03-19 07:59:11 86622 1 Response:  PROT C;P;
2019-03-19 07:59:11 86622 1 Response:  CCC
2019-03-19 07:59:11 86622 1 Response:  HOST
2019-03-19 07:59:11 86622 1 Response:  SIZE
2019-03-19 07:59:11 86622 1 Response:  MDTM
2019-03-19 07:59:11 86622 1 Response:  REST STREAM
2019-03-19 07:59:11 86622 1 Response: 211 END
2019-03-19 07:59:11 86622 1 Command: OPTS UTF8 ON
2019-03-19 07:59:11 86622 1 Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
akumar2301
Specialist II

Did you already try on port 21? In logs it is connecting on port 21.
Anonymous
Not applicable
Author

Thanks for the quick response @uganesh 

 

Yes, I am using Port 21 in the Filezilla. Tested using the same port in talend here is the response

 

[statistics] connecting to socket on port 4046

[statistics] connected

Exception in component tFTPConnection_1 (Job3)

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)

 

akumar2301
Specialist II

Now it is certificate error. Are you using any KeyStrore file when connecting using filezila ?

 

Anonymous
Not applicable
Author

No @uganesh  there isn't any certificate used but when I use this setting in the tFTP Connection with Port 21 there is no error 

Screenshot 2019-03-19 at 18.50.15.png

 

 

But no relevant information too 

Screenshot 2019-03-19 at 18.51.51.png

 

Screenshot 2019-03-19 at 18.54.05.png

 

Any idea ?